/*
Navicat SQL Server Data Transfer

Source Server         : VERTEXSRV
Source Server Version : 100000
Source Host           : VERTEXSRV:1433
Source Database       : CSMSys
Source Schema         : dbo

Target Server Type    : SQL Server
Target Server Version : 100000
File Encoding         : 65001

Date: 2013-02-03 14:09:37
*/


-- ----------------------------
-- Table structure for [dbo].[ACCAccount]
-- ----------------------------
DROP TABLE [dbo].[ACCAccount]
GO
CREATE TABLE [dbo].[ACCAccount] (
[AccountID] bigint NOT NULL IDENTITY(1,1) ,
[AccountNo] bigint NOT NULL ,
[AccountTypeNo] smallint NOT NULL ,
[AccountTypeName] nvarchar(50) NULL ,
[AccountSubtypeNo] smallint NULL ,
[AccountSubtypeName] nvarchar(50) NULL ,
[AccountTitle] nvarchar(100) NULL ,
[OpeningBalance] float(53) NULL ,
[AccountBalance] float(53) NULL ,
[AccountStatus] smallint NULL ,
[AccountComments] nvarchar(MAX) NULL ,
[CreatedBy] uniqueidentifier NULL ,
[CreatedDate] datetime NULL ,
[ModifiedBy] uniqueidentifier NULL ,
[ModifiedDate] datetime NULL 
)


GO
DBCC CHECKIDENT(N'[dbo].[ACCAccount]', RESEED, 85)
GO

-- ----------------------------
-- Records of ACCAccount
-- ----------------------------
SET IDENTITY_INSERT [dbo].[ACCAccount] ON
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'1', N'910000000', N'1', N'CAPITAL', N'1', N'-', N'CAPITAL', N'4', N'3', N'1', N'-', N'00000000-0000-0000-0000-000000000000', N'2013-01-28 13:17:08.450', N'00000000-0000-0000-0000-000000000000', N'2013-01-28 13:17:08.450');
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'2', N'911000000', N'1', N'CAPITAL', N'1', N'Investment', N'Investment', N'0', N'0', N'4', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'3', N'920000000', N'2', N'CURRENT ASSET', N'0', N'-', N'CURRENT ASSET', N'0', N'0', N'5', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'4', N'921000000', N'2', N'CURRENT ASSET', N'1', N'Cash', N'Cash', N'0', N'0', N'4', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'6', N'931193119311000003', N'3', N'FIXED ASSET', N'11', N'Machineries', N'Petty Cash', N'5656', N'4545', N'1', N'-erer', N'00000000-0000-0000-0000-000000000000', N'2013-02-02 19:52:34.353', N'00000000-0000-0000-0000-000000000000', N'2013-02-02 19:52:34.353');
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'7', N'922000000', N'2', N'CURRENT ASSET', N'2', N'Sundry Debtors', N'Sundry Debtors', N'0', N'0', N'4', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'8', N'923000000', N'2', N'CURRENT ASSET', N'3', N'Bank Account', N'Bank Account', N'0', N'0', N'4', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'9', N'924000000', N'2', N'CURRENT ASSET', N'4', N'Advance Receivable', N'Advance Receivable', N'0', N'0', N'4', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'10', N'925000000', N'2', N'CURRENT ASSET', N'5', N'Stock & Store', N'Stock & Store', N'0', N'0', N'4', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'11', N'925000001', N'2', N'CURRENT ASSET', N'5', N'Stock of Finished Goods', N'Stock of Finished Goods', N'0', N'0', N'1', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'12', N'925000002', N'2', N'CURRENT ASSET', N'5', N'Stock of Raw Materials', N'Stock of Raw Materials', N'0', N'0', N'1', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'13', N'926000000', N'2', N'CURRENT ASSET', N'6', N'Bills Receivable', N'Bills Receivable', N'0', N'0', N'4', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'14', N'927000000', N'2', N'CURRENT ASSET', N'7', N'Bills Receivable', N'Sales Terminal', N'0', N'0', N'4', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'15', N'930000000', N'3', N'FIXED ASSET', N'0', N'-', N'FIXED ASSET', N'0', N'0', N'5', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'16', N'931000000', N'3', N'FIXED ASSET', N'1', N'Building', N'Building', N'0', N'0', N'4', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'17', N'932000000', N'3', N'FIXED ASSET', N'2', N'Furniture', N'Furniture', N'0', N'0', N'4', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'18', N'933000000', N'3', N'FIXED ASSET', N'3', N'Machineries', N'Machineries', N'0', N'0', N'4', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'19', N'934000000', N'3', N'FIXED ASSET', N'4', N'Accesories', N'Accesories', N'0', N'0', N'4', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'20', N'940000000', N'4', N'CURRENT LIABILITIES', N'0', N'-', N'CURRENT LIABILITIES', N'0', N'0', N'5', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'21', N'941000000', N'4', N'CURRENT LIABILITIES', N'1', N'Sundry Creditors', N'Sundry Creditors', N'0', N'0', N'4', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'22', N'942000000', N'4', N'CURRENT LIABILITIES', N'2', N'Advanced Received', N'Advanced Received', N'0', N'0', N'4', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'23', N'943000000', N'4', N'CURRENT LIABILITIES', N'3', N'Bank Loan', N'Bank Loan', N'0', N'0', N'4', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'24', N'944000000', N'4', N'CURRENT LIABILITIES', N'4', N'Bills Payable', N'Bills Payable', N'0', N'0', N'4', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'25', N'945000000', N'4', N'CURRENT LIABILITIES', N'5', N'Branch/Divisions', N'Branch/Divisions', N'0', N'0', N'4', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'26', N'946000000', N'4', N'CURRENT LIABILITIES', N'6', N'Advance Payable', N'Advance Payable', N'0', N'0', N'4', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'27', N'950000000', N'5', N'LONG TERM LIABILITIES', N'0', N'-', N'LONG TERM LIABILITIES', N'0', N'0', N'5', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'28', N'960000000', N'6', N'INCOME', N'0', N'-', N'INCOME', N'0', N'0', N'5', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'29', N'961000000', N'6', N'INCOME', N'1', N'Sales Account', N'Sales Account', N'0', N'0', N'4', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'30', N'961000001', N'6', N'INCOME', N'1', N'Sales Account', N'Export Sales', N'0', N'0', N'1', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'31', N'961000002', N'6', N'INCOME', N'1', N'Sales Account', N'Local Sales', N'0', N'0', N'1', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'32', N'962000000', N'6', N'INCOME', N'2', N'Other Income Account', N'Other Income Account', N'0', N'0', N'4', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'33', N'962000001', N'6', N'INCOME', N'2', N'Other Income Account', N'Purchase Discount', N'0', N'0', N'1', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'34', N'962000002', N'6', N'INCOME', N'2', N'Other Income Account', N'Membership Fee', N'0', N'0', N'1', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'35', N'962000003', N'6', N'INCOME', N'2', N'Other Income Account', N'Sales VAT', N'0', N'0', N'1', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'36', N'962000004', N'6', N'INCOME', N'2', N'Other Income Account', N'Sales Commission Receivable', N'0', N'0', N'1', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'37', N'962000005', N'6', N'INCOME', N'2', N'Other Income Account', N'Purchase Commission Receivable', N'0', N'0', N'1', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'38', N'963000000', N'6', N'INCOME', N'3', N'Service Account', N'Service Account', N'0', N'0', N'4', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'39', N'963000001', N'6', N'INCOME', N'3', N'Service Account', N'Service Charge', N'0', N'0', N'1', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'40', N'964000000', N'6', N'INCOME', N'4', N'Returned Earning', N'Returned Earning', N'0', N'0', N'4', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'41', N'964000001', N'6', N'INCOME', N'4', N'Returned Earning', N'Purchase Return', N'0', N'0', N'1', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'42', N'970000000', N'7', N'EXPENDITURE', N'0', N'-', N'EXPENDITURE', N'0', N'0', N'5', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'43', N'971000000', N'7', N'EXPENDITURE', N'1', N'Production Overhead', N'Production Overhead', N'0', N'0', N'4', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'44', N'972000000', N'7', N'EXPENDITURE', N'2', N'Administrative Overhead', N'Administrative Overhead', N'0', N'0', N'4', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'45', N'973000000', N'7', N'EXPENDITURE', N'3', N'Financial Expense', N'Financial Expense', N'0', N'0', N'4', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'46', N'974000000', N'7', N'EXPENDITURE', N'4', N'Selling Expense', N'Selling Expense', N'0', N'0', N'4', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'47', N'974000001', N'7', N'EXPENDITURE', N'4', N'Selling Expense', N'Sales Discount', N'0', N'0', N'1', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'48', N'975000000', N'7', N'EXPENDITURE', N'5', N'Purchase Account', N'Purchase Account', N'0', N'0', N'4', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'49', N'975000001', N'7', N'EXPENDITURE', N'5', N'Purchase Account', N'Raw Materials Purchase', N'0', N'0', N'1', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'50', N'975000002', N'7', N'EXPENDITURE', N'5', N'Purchase Account', N'Finished Goods Purchase', N'0', N'0', N'1', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'51', N'976000000', N'7', N'EXPENDITURE', N'6', N'Indirect Expense', N'Indirect Expense', N'0', N'0', N'4', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'52', N'976000001', N'7', N'EXPENDITURE', N'6', N'Indirect Expense', N'Depreciation', N'0', N'0', N'1', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'53', N'977000000', N'7', N'EXPENDITURE', N'7', N'Returned Expense', N'Returned Expense', N'0', N'0', N'4', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'54', N'977000001', N'7', N'EXPENDITURE', N'7', N'Returned Expense', N'Sales Return', N'0', N'0', N'1', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'55', N'978000000', N'7', N'EXPENDITURE', N'8', N'Other Expense Account', N'Other Expense Account', N'0', N'0', N'4', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'56', N'978000001', N'7', N'EXPENDITURE', N'8', N'Other Expense Account', N'Purchase VAT', N'0', N'0', N'1', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'57', N'978000002', N'7', N'EXPENDITURE', N'8', N'Other Expense Account', N'Sales Commission Payable', N'0', N'0', N'1', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'58', N'978000003', N'7', N'EXPENDITURE', N'8', N'Other Expense Account', N'Purchase Commission Payable', N'0', N'0', N'1', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'59', N'979000000', N'7', N'EXPENDITURE', N'9', N'Utility Bills', N'Utility Bills', N'0', N'0', N'4', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'60', N'979000001', N'7', N'EXPENDITURE', N'9', N'Utility Bills', N'Electricity Bills', N'0', N'0', N'1', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'61', N'979000002', N'7', N'EXPENDITURE', N'9', N'Utility Bills', N'Gas Bills', N'0', N'0', N'1', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'62', N'979000003', N'7', N'EXPENDITURE', N'9', N'Utility Bills', N'Telephone Bills', N'0', N'0', N'1', N'-', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'63', N'979000005', N'7', N'EXPENDITURE', N'9', N'Building', N'Internet Bills', N'2222220', N'333330', N'1', N'-wewewewewewew', N'00000000-0000-0000-0000-000000000000', N'2013-02-03 12:14:53.627', N'00000000-0000-0000-0000-000000000000', N'2013-02-03 12:14:53.627');
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'75', N'9310000001', N'3', N'FIXED ASSET', N'10', N'Furniture', N'rerr', N'454545', N'456', N'1', N'erer', N'BE693668-F39A-4511-8E1F-BCFE2A05DE01', N'2013-02-02 19:00:01.350', N'BE693668-F39A-4511-8E1F-BCFE2A05DE01', N'2013-02-02 19:00:01.357');
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'81', N'9310000003', N'3', N'FIXED ASSET', N'10', N'Furniture', N'eeee', N'3434', N'43400000', N'1', N'erererer', N'00000000-0000-0000-0000-000000000000', N'2013-02-03 12:16:08.903', N'00000000-0000-0000-0000-000000000000', N'2013-02-03 12:16:08.903');
GO
INSERT INTO [dbo].[ACCAccount] ([AccountID], [AccountNo], [AccountTypeNo], [AccountTypeName], [AccountSubtypeNo], [AccountSubtypeName], [AccountTitle], [OpeningBalance], [AccountBalance], [AccountStatus], [AccountComments], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'85', N'9310000004', N'3', N'FIXED ASSET', N'10', N'Furniture', N'rtrtrt', N'43434', N'343455', N'1', N'sdsd', N'00000000-0000-0000-0000-000000000000', N'2013-02-03 12:47:08.750', N'00000000-0000-0000-0000-000000000000', N'2013-02-03 12:47:08.750');
GO
SET IDENTITY_INSERT [dbo].[ACCAccount] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[ACCAccountDetails]
-- ----------------------------
DROP TABLE [dbo].[ACCAccountDetails]
GO
CREATE TABLE [dbo].[ACCAccountDetails] (
[AccountDetailsID] bigint NOT NULL IDENTITY(1,1) ,
[AccountID] bigint NOT NULL ,
[TransactionID] bigint NULL ,
[AccountBalance] float(53) NULL ,
[AccountStatus] smallint NULL ,
[CreatedBy] uniqueidentifier NULL ,
[CreatedDate] datetime NULL ,
[ModifiedBy] uniqueidentifier NULL ,
[ModifiedDate] datetime NULL 
)


GO

-- ----------------------------
-- Records of ACCAccountDetails
-- ----------------------------
SET IDENTITY_INSERT [dbo].[ACCAccountDetails] ON
GO
SET IDENTITY_INSERT [dbo].[ACCAccountDetails] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[ACCAccountSubtype]
-- ----------------------------
DROP TABLE [dbo].[ACCAccountSubtype]
GO
CREATE TABLE [dbo].[ACCAccountSubtype] (
[AccountSubtypeID] bigint NOT NULL IDENTITY(1,1) ,
[AccountSubtypeNo] smallint NOT NULL ,
[AccountTypeNo] smallint NOT NULL ,
[AccountSubtypeName] nvarchar(100) NOT NULL ,
[CreatedBy] uniqueidentifier NULL ,
[CreatedDate] datetime NULL ,
[ModifiedBy] uniqueidentifier NULL ,
[ModifiedDate] datetime NULL 
)


GO
DBCC CHECKIDENT(N'[dbo].[ACCAccountSubtype]', RESEED, 32)
GO

-- ----------------------------
-- Records of ACCAccountSubtype
-- ----------------------------
SET IDENTITY_INSERT [dbo].[ACCAccountSubtype] ON
GO
INSERT INTO [dbo].[ACCAccountSubtype] ([AccountSubtypeID], [AccountSubtypeNo], [AccountTypeNo], [AccountSubtypeName], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'1', N'1', N'1', N'Investment', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccountSubtype] ([AccountSubtypeID], [AccountSubtypeNo], [AccountTypeNo], [AccountSubtypeName], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'2', N'1', N'2', N'Cash', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccountSubtype] ([AccountSubtypeID], [AccountSubtypeNo], [AccountTypeNo], [AccountSubtypeName], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'3', N'2', N'2', N'Sundry Debtors', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccountSubtype] ([AccountSubtypeID], [AccountSubtypeNo], [AccountTypeNo], [AccountSubtypeName], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'4', N'3', N'2', N'Bank Account', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccountSubtype] ([AccountSubtypeID], [AccountSubtypeNo], [AccountTypeNo], [AccountSubtypeName], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'5', N'4', N'2', N'Advance Receivable', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccountSubtype] ([AccountSubtypeID], [AccountSubtypeNo], [AccountTypeNo], [AccountSubtypeName], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'6', N'5', N'2', N'Stock & Store', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccountSubtype] ([AccountSubtypeID], [AccountSubtypeNo], [AccountTypeNo], [AccountSubtypeName], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'7', N'6', N'2', N'Bills Receivable', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccountSubtype] ([AccountSubtypeID], [AccountSubtypeNo], [AccountTypeNo], [AccountSubtypeName], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'8', N'7', N'2', N'Sales Terminal', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccountSubtype] ([AccountSubtypeID], [AccountSubtypeNo], [AccountTypeNo], [AccountSubtypeName], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'9', N'1', N'3', N'Building', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccountSubtype] ([AccountSubtypeID], [AccountSubtypeNo], [AccountTypeNo], [AccountSubtypeName], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'10', N'2', N'3', N'Furniture', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccountSubtype] ([AccountSubtypeID], [AccountSubtypeNo], [AccountTypeNo], [AccountSubtypeName], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'11', N'3', N'3', N'Machineries', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccountSubtype] ([AccountSubtypeID], [AccountSubtypeNo], [AccountTypeNo], [AccountSubtypeName], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'12', N'4', N'3', N'Accesories', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccountSubtype] ([AccountSubtypeID], [AccountSubtypeNo], [AccountTypeNo], [AccountSubtypeName], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'13', N'1', N'4', N'Sundry Creditors', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccountSubtype] ([AccountSubtypeID], [AccountSubtypeNo], [AccountTypeNo], [AccountSubtypeName], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'14', N'2', N'4', N'Advanced Received', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccountSubtype] ([AccountSubtypeID], [AccountSubtypeNo], [AccountTypeNo], [AccountSubtypeName], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'15', N'3', N'4', N'Bank Loan', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccountSubtype] ([AccountSubtypeID], [AccountSubtypeNo], [AccountTypeNo], [AccountSubtypeName], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'16', N'4', N'4', N'Bills Payable', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccountSubtype] ([AccountSubtypeID], [AccountSubtypeNo], [AccountTypeNo], [AccountSubtypeName], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'17', N'5', N'4', N'Branch/Divisions', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccountSubtype] ([AccountSubtypeID], [AccountSubtypeNo], [AccountTypeNo], [AccountSubtypeName], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'18', N'6', N'4', N'Advance Payable', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccountSubtype] ([AccountSubtypeID], [AccountSubtypeNo], [AccountTypeNo], [AccountSubtypeName], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'19', N'1', N'6', N'Sales Account', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccountSubtype] ([AccountSubtypeID], [AccountSubtypeNo], [AccountTypeNo], [AccountSubtypeName], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'20', N'2', N'6', N'Other Income Account', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccountSubtype] ([AccountSubtypeID], [AccountSubtypeNo], [AccountTypeNo], [AccountSubtypeName], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'21', N'3', N'6', N'Service Account', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccountSubtype] ([AccountSubtypeID], [AccountSubtypeNo], [AccountTypeNo], [AccountSubtypeName], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'22', N'4', N'6', N'Returned Earning', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccountSubtype] ([AccountSubtypeID], [AccountSubtypeNo], [AccountTypeNo], [AccountSubtypeName], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'23', N'1', N'7', N'Production Overhead', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccountSubtype] ([AccountSubtypeID], [AccountSubtypeNo], [AccountTypeNo], [AccountSubtypeName], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'24', N'2', N'7', N'Administrative Overhead', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccountSubtype] ([AccountSubtypeID], [AccountSubtypeNo], [AccountTypeNo], [AccountSubtypeName], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'25', N'3', N'7', N'Financial Expense', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccountSubtype] ([AccountSubtypeID], [AccountSubtypeNo], [AccountTypeNo], [AccountSubtypeName], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'26', N'4', N'7', N'Selling Expense', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccountSubtype] ([AccountSubtypeID], [AccountSubtypeNo], [AccountTypeNo], [AccountSubtypeName], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'27', N'5', N'7', N'Purchase Account', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccountSubtype] ([AccountSubtypeID], [AccountSubtypeNo], [AccountTypeNo], [AccountSubtypeName], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'28', N'6', N'7', N'Indirect Expense', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccountSubtype] ([AccountSubtypeID], [AccountSubtypeNo], [AccountTypeNo], [AccountSubtypeName], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'29', N'7', N'7', N'Returned Expense', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccountSubtype] ([AccountSubtypeID], [AccountSubtypeNo], [AccountTypeNo], [AccountSubtypeName], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'30', N'8', N'7', N'Other Expense Account', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccountSubtype] ([AccountSubtypeID], [AccountSubtypeNo], [AccountTypeNo], [AccountSubtypeName], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'31', N'9', N'7', N'Utility Bills', null, null, null, null);
GO
SET IDENTITY_INSERT [dbo].[ACCAccountSubtype] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[ACCAccountType]
-- ----------------------------
DROP TABLE [dbo].[ACCAccountType]
GO
CREATE TABLE [dbo].[ACCAccountType] (
[AccountTypeID] bigint NOT NULL IDENTITY(1,1) ,
[AccountTypeNo] smallint NOT NULL ,
[AccountTypeName] nvarchar(100) NULL ,
[AccountDrCr] smallint NULL ,
[CreatedBy] uniqueidentifier NULL ,
[CreatedDate] datetime NULL ,
[ModifiedBy] uniqueidentifier NULL ,
[ModifiedDate] datetime NULL 
)


GO
DBCC CHECKIDENT(N'[dbo].[ACCAccountType]', RESEED, 7)
GO

-- ----------------------------
-- Records of ACCAccountType
-- ----------------------------
SET IDENTITY_INSERT [dbo].[ACCAccountType] ON
GO
INSERT INTO [dbo].[ACCAccountType] ([AccountTypeID], [AccountTypeNo], [AccountTypeName], [AccountDrCr], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'1', N'1', N'CAPITAL', N'-1', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccountType] ([AccountTypeID], [AccountTypeNo], [AccountTypeName], [AccountDrCr], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'2', N'2', N'CURRENT ASSET', N'1', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccountType] ([AccountTypeID], [AccountTypeNo], [AccountTypeName], [AccountDrCr], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'3', N'3', N'FIXED ASSET', N'1', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccountType] ([AccountTypeID], [AccountTypeNo], [AccountTypeName], [AccountDrCr], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'4', N'4', N'CURRENT LIABILITIES', N'-1', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccountType] ([AccountTypeID], [AccountTypeNo], [AccountTypeName], [AccountDrCr], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'5', N'5', N'LONG TERM LIABILITIES', N'-1', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccountType] ([AccountTypeID], [AccountTypeNo], [AccountTypeName], [AccountDrCr], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'6', N'6', N'INCOME', N'-1', null, null, null, null);
GO
INSERT INTO [dbo].[ACCAccountType] ([AccountTypeID], [AccountTypeNo], [AccountTypeName], [AccountDrCr], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'7', N'7', N'EXPENDITURE', N'1', null, null, null, null);
GO
SET IDENTITY_INSERT [dbo].[ACCAccountType] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[ACCAccountUpdate]
-- ----------------------------
DROP TABLE [dbo].[ACCAccountUpdate]
GO
CREATE TABLE [dbo].[ACCAccountUpdate] (
[AccountUpdateID] bigint NOT NULL IDENTITY(1,1) ,
[AccountID] bigint NOT NULL ,
[TransactionID] bigint NULL ,
[OldAmount] float(53) NULL ,
[NewAmount] float(53) NULL ,
[BalanceAmount] AS ([NewAmount]-[OldAmount]) ,
[AccountStatus] smallint NULL ,
[CreatedBy] uniqueidentifier NULL ,
[CreatedDate] datetime NULL ,
[ModifiedBy] uniqueidentifier NULL ,
[ModifiedDate] datetime NULL 
)


GO

-- ----------------------------
-- Records of ACCAccountUpdate
-- ----------------------------
SET IDENTITY_INSERT [dbo].[ACCAccountUpdate] ON
GO
SET IDENTITY_INSERT [dbo].[ACCAccountUpdate] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[ACCBank]
-- ----------------------------
DROP TABLE [dbo].[ACCBank]
GO
CREATE TABLE [dbo].[ACCBank] (
[BankID] bigint NOT NULL IDENTITY(1,1) ,
[BankName] nvarchar(100) NULL ,
[BranchName] nvarchar(100) NULL ,
[BankAccountNo] nvarchar(50) NULL ,
[BankAccountName] nvarchar(100) NULL ,
[BankAccountType] nvarchar(50) NULL ,
[AccountID] bigint NOT NULL ,
[AccountNo] bigint NULL ,
[BankAccountSubtypeNo] smallint NULL ,
[OpeningBalance] float(53) NULL ,
[Currency] nvarchar(10) NULL ,
[ContactPerson] nvarchar(50) NULL ,
[Address] nvarchar(MAX) NULL ,
[BankTel] nvarchar(50) NULL ,
[BankFax] nvarchar(50) NULL ,
[ContactAddress] nvarchar(50) NULL ,
[ContactTel] nvarchar(50) NULL ,
[ContactCell] nvarchar(50) NULL ,
[ContactEmail] nvarchar(50) NULL ,
[Photo] image NULL ,
[Signature] image NULL ,
[Remarks] nvarchar(MAX) NULL ,
[IsActive] bit NULL ,
[CreatedBy] uniqueidentifier NULL ,
[CreatedDate] datetime NULL ,
[ModifiedBy] uniqueidentifier NULL ,
[ModifiedDate] datetime NULL 
)


GO

-- ----------------------------
-- Records of ACCBank
-- ----------------------------
SET IDENTITY_INSERT [dbo].[ACCBank] ON
GO
SET IDENTITY_INSERT [dbo].[ACCBank] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[ACCBillsPaid]
-- ----------------------------
DROP TABLE [dbo].[ACCBillsPaid]
GO
CREATE TABLE [dbo].[ACCBillsPaid] (
[BillsPaidID] bigint NOT NULL IDENTITY(1,1) ,
[BillsPayableID] bigint NOT NULL ,
[VoucherID] bigint NOT NULL ,
[TransactionID] bigint NOT NULL ,
[PaymentSerial] smallint NULL ,
[PaymentDate] datetime NULL ,
[PayableAmount] float(53) NULL ,
[PaidAmount] float(53) NULL ,
[BalanceAmount] AS ([PayableAmount]-[PaidAmount]) ,
[CreatedBy] uniqueidentifier NULL ,
[CreatedDate] datetime NULL ,
[ModifiedBy] uniqueidentifier NULL ,
[ModifiedDate] datetime NULL 
)


GO

-- ----------------------------
-- Records of ACCBillsPaid
-- ----------------------------
SET IDENTITY_INSERT [dbo].[ACCBillsPaid] ON
GO
SET IDENTITY_INSERT [dbo].[ACCBillsPaid] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[ACCBillsPayable]
-- ----------------------------
DROP TABLE [dbo].[ACCBillsPayable]
GO
CREATE TABLE [dbo].[ACCBillsPayable] (
[BillsPayableID] bigint NOT NULL IDENTITY(1,1) ,
[AccountID] bigint NOT NULL ,
[BillsPayableNo] nvarchar(50) NOT NULL ,
[PayableDate] datetime NULL ,
[ReferenceBillNo] nvarchar(50) NULL ,
[AccountNo] bigint NULL ,
[PayableAmount] float(53) NULL ,
[PaidAmount] float(53) NULL ,
[BalanceAmount] AS ([PayableAmount]-[PaidAmount]) ,
[CreatedBy] uniqueidentifier NULL ,
[CreatedDate] datetime NULL ,
[ModifiedBy] uniqueidentifier NULL ,
[ModifiedDate] datetime NULL 
)


GO

-- ----------------------------
-- Records of ACCBillsPayable
-- ----------------------------
SET IDENTITY_INSERT [dbo].[ACCBillsPayable] ON
GO
SET IDENTITY_INSERT [dbo].[ACCBillsPayable] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[ACCBillsReceivable]
-- ----------------------------
DROP TABLE [dbo].[ACCBillsReceivable]
GO
CREATE TABLE [dbo].[ACCBillsReceivable] (
[BillsReceivableID] bigint NOT NULL IDENTITY(1,1) ,
[AccountID] bigint NOT NULL ,
[BillsReceivableNo] nvarchar(50) NOT NULL ,
[ReceivableDate] datetime NULL ,
[ReferenceBillNo] nvarchar(50) NULL ,
[AccountNo] bigint NULL ,
[ReceivableAmount] float(53) NULL ,
[ReceivedAmount] float(53) NULL ,
[BalanceAmount] AS ([ReceivableAmount]-[ReceivedAmount]) ,
[CreatedBy] uniqueidentifier NULL ,
[CreatedDate] datetime NULL ,
[ModifiedBy] uniqueidentifier NULL ,
[ModifiedDate] datetime NULL 
)


GO

-- ----------------------------
-- Records of ACCBillsReceivable
-- ----------------------------
SET IDENTITY_INSERT [dbo].[ACCBillsReceivable] ON
GO
SET IDENTITY_INSERT [dbo].[ACCBillsReceivable] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[ACCBillsReceived]
-- ----------------------------
DROP TABLE [dbo].[ACCBillsReceived]
GO
CREATE TABLE [dbo].[ACCBillsReceived] (
[BillsReceivedID] bigint NOT NULL IDENTITY(1,1) ,
[BillsReceivableID] bigint NOT NULL ,
[VoucherID] bigint NOT NULL ,
[TransactionID] bigint NOT NULL ,
[ReceivedSerial] smallint NULL ,
[ReceivedDate] datetime NULL ,
[ReceivableAmount] float(53) NULL ,
[ReceivedAmount] float(53) NULL ,
[BalanceAmount] AS ([ReceivableAmount]-[ReceivedAmount]) ,
[CreatedBy] uniqueidentifier NULL ,
[CreatedDate] datetime NULL ,
[ModifiedBy] uniqueidentifier NULL ,
[ModifiedDate] datetime NULL 
)


GO

-- ----------------------------
-- Records of ACCBillsReceived
-- ----------------------------
SET IDENTITY_INSERT [dbo].[ACCBillsReceived] ON
GO
SET IDENTITY_INSERT [dbo].[ACCBillsReceived] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[ACCChequePaid]
-- ----------------------------
DROP TABLE [dbo].[ACCChequePaid]
GO
CREATE TABLE [dbo].[ACCChequePaid] (
[ChequePaidID] bigint NOT NULL IDENTITY(1,1) ,
[BankID] bigint NOT NULL ,
[TransactionID] bigint NULL ,
[AccountID] bigint NULL ,
[ChequeNo] nvarchar(50) NOT NULL ,
[ChequeDate] datetime NULL ,
[ChequeAmount] float(53) NULL ,
[ChequeStatus] smallint NULL ,
[CreatedBy] uniqueidentifier NULL ,
[CreatedDate] datetime NULL ,
[ModifiedBy] uniqueidentifier NULL ,
[ModifiedDate] datetime NULL 
)


GO

-- ----------------------------
-- Records of ACCChequePaid
-- ----------------------------
SET IDENTITY_INSERT [dbo].[ACCChequePaid] ON
GO
SET IDENTITY_INSERT [dbo].[ACCChequePaid] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[ACCChequeReceived]
-- ----------------------------
DROP TABLE [dbo].[ACCChequeReceived]
GO
CREATE TABLE [dbo].[ACCChequeReceived] (
[ChequeReceivedID] bigint NOT NULL IDENTITY(1,1) ,
[BankName] nvarchar(100) NULL ,
[BranchName] nvarchar(100) NULL ,
[BankAccountNo] nvarchar(50) NULL ,
[BankAccountName] nvarchar(100) NULL ,
[TransactionID] bigint NULL ,
[AccountID] bigint NULL ,
[ChequeNo] nvarchar(50) NOT NULL ,
[ChequeDate] datetime NULL ,
[ChequeAmount] float(53) NULL ,
[ChequeStatus] smallint NULL ,
[CreatedBy] uniqueidentifier NULL ,
[CreatedDate] datetime NULL ,
[ModifiedBy] uniqueidentifier NULL ,
[ModifiedDate] datetime NULL 
)


GO

-- ----------------------------
-- Records of ACCChequeReceived
-- ----------------------------
SET IDENTITY_INSERT [dbo].[ACCChequeReceived] ON
GO
SET IDENTITY_INSERT [dbo].[ACCChequeReceived] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[ACCFiscalPeriod]
-- ----------------------------
DROP TABLE [dbo].[ACCFiscalPeriod]
GO
CREATE TABLE [dbo].[ACCFiscalPeriod] (
[PeriodID] int NOT NULL IDENTITY(1,1) ,
[PeriodNo] int NOT NULL ,
[StartDate] datetime NULL ,
[EndDate] datetime NULL ,
[BeginningCapital] float(53) NULL ,
[EndingCapital] float(53) NULL ,
[NetProfit] float(53) NULL ,
[ActivateJournal] bit NOT NULL ,
[CreatedBy] uniqueidentifier NULL ,
[CreatedDate] datetime NULL ,
[ModifiedBy] uniqueidentifier NULL ,
[ModifiedDate] datetime NULL 
)


GO

-- ----------------------------
-- Records of ACCFiscalPeriod
-- ----------------------------
SET IDENTITY_INSERT [dbo].[ACCFiscalPeriod] ON
GO
SET IDENTITY_INSERT [dbo].[ACCFiscalPeriod] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[ACCJournal]
-- ----------------------------
DROP TABLE [dbo].[ACCJournal]
GO
CREATE TABLE [dbo].[ACCJournal] (
[JournalID] bigint NOT NULL IDENTITY(1,1) ,
[JournalNo] bigint NULL ,
[TransactionID] bigint NULL ,
[AccountID] bigint NULL ,
[JournalAmount] float(53) NULL ,
[CreatedBy] uniqueidentifier NULL ,
[CreatedDate] datetime NULL ,
[ModifiedBy] uniqueidentifier NULL ,
[ModifiedDate] datetime NULL 
)


GO

-- ----------------------------
-- Records of ACCJournal
-- ----------------------------
SET IDENTITY_INSERT [dbo].[ACCJournal] ON
GO
SET IDENTITY_INSERT [dbo].[ACCJournal] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[ACCLedger]
-- ----------------------------
DROP TABLE [dbo].[ACCLedger]
GO
CREATE TABLE [dbo].[ACCLedger] (
[LedgerID] bigint NOT NULL IDENTITY(1,1) ,
[AccountID] bigint NULL ,
[Balance] float(53) NULL ,
[DrCr] smallint NULL ,
[ClosingBalance] float(53) NULL ,
[CreatedBy] uniqueidentifier NULL ,
[CreatedDate] datetime NULL ,
[ModifiedBy] uniqueidentifier NULL ,
[ModifiedDate] datetime NULL 
)


GO

-- ----------------------------
-- Records of ACCLedger
-- ----------------------------
SET IDENTITY_INSERT [dbo].[ACCLedger] ON
GO
SET IDENTITY_INSERT [dbo].[ACCLedger] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[ACCTransaction]
-- ----------------------------
DROP TABLE [dbo].[ACCTransaction]
GO
CREATE TABLE [dbo].[ACCTransaction] (
[TransactionID] bigint NOT NULL IDENTITY(1,1) ,
[Description] nvarchar(MAX) NULL ,
[ReferenceID] bigint NULL ,
[TransactionDate] datetime NULL ,
[PaymentMethod] smallint NULL ,
[TransactionAmount] float(53) NULL ,
[CreatedBy] uniqueidentifier NULL ,
[CreatedDate] datetime NULL ,
[ModifiedBy] uniqueidentifier NULL ,
[ModifiedDate] datetime NULL 
)


GO

-- ----------------------------
-- Records of ACCTransaction
-- ----------------------------
SET IDENTITY_INSERT [dbo].[ACCTransaction] ON
GO
SET IDENTITY_INSERT [dbo].[ACCTransaction] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[ACCTransactionUpdate]
-- ----------------------------
DROP TABLE [dbo].[ACCTransactionUpdate]
GO
CREATE TABLE [dbo].[ACCTransactionUpdate] (
[TransactionID] bigint NOT NULL ,
[Description] nvarchar(MAX) NULL ,
[ReferenceID] bigint NULL ,
[TransactionDate] datetime NULL ,
[PaymentMethod] smallint NULL ,
[TransactionAmount] float(53) NULL ,
[OldAmount] float(53) NULL ,
[NewAmount] float(53) NULL ,
[CreatedBy] uniqueidentifier NULL ,
[CreatedDate] datetime NULL ,
[ModifiedBy] uniqueidentifier NULL ,
[ModifiedDate] datetime NULL 
)


GO

-- ----------------------------
-- Records of ACCTransactionUpdate
-- ----------------------------

-- ----------------------------
-- Table structure for [dbo].[ACCVoucher]
-- ----------------------------
DROP TABLE [dbo].[ACCVoucher]
GO
CREATE TABLE [dbo].[ACCVoucher] (
[VoucherID] bigint NOT NULL IDENTITY(1,1) ,
[VoucherNo] nvarchar(50) NULL ,
[TransactionID] bigint NULL ,
[VoucherTypeNo] smallint NULL ,
[VoucherDate] datetime NULL ,
[VoucherPayee] nvarchar(50) NULL ,
[ApprovedBy] nvarchar(50) NULL ,
[VoucherAmount] float(53) NULL ,
[IsApproved] bit NULL ,
[CreatedBy] uniqueidentifier NULL ,
[CreatedDate] datetime NULL ,
[ModifiedBy] uniqueidentifier NULL ,
[ModifiedDate] datetime NULL 
)


GO

-- ----------------------------
-- Records of ACCVoucher
-- ----------------------------
SET IDENTITY_INSERT [dbo].[ACCVoucher] ON
GO
INSERT INTO [dbo].[ACCVoucher] ([VoucherID], [VoucherNo], [TransactionID], [VoucherTypeNo], [VoucherDate], [VoucherPayee], [ApprovedBy], [VoucherAmount], [IsApproved], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'1', N'1', N'1', N'1', N'2013-11-01 00:00:00.000', N'1', N'2', N'2333', N'1', N'00000000-0000-0000-0000-000000000000', null, null, null);
GO
SET IDENTITY_INSERT [dbo].[ACCVoucher] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[ACCVoucherLink]
-- ----------------------------
DROP TABLE [dbo].[ACCVoucherLink]
GO
CREATE TABLE [dbo].[ACCVoucherLink] (
[VoucherLinkID] bigint NOT NULL IDENTITY(1,1) ,
[VoucherLinkNo] smallint NULL ,
[VoucherID] bigint NULL ,
[TransactionID] bigint NULL ,
[VoucherNo] nvarchar(50) NULL ,
[CreatedBy] uniqueidentifier NULL ,
[CreatedDate] datetime NULL ,
[ModifiedBy] uniqueidentifier NULL ,
[ModifiedDate] datetime NULL 
)


GO

-- ----------------------------
-- Records of ACCVoucherLink
-- ----------------------------
SET IDENTITY_INSERT [dbo].[ACCVoucherLink] ON
GO
SET IDENTITY_INSERT [dbo].[ACCVoucherLink] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[ACCVoucherUpdate]
-- ----------------------------
DROP TABLE [dbo].[ACCVoucherUpdate]
GO
CREATE TABLE [dbo].[ACCVoucherUpdate] (
[VoucherUpdateID] bigint NOT NULL ,
[VoucherID] bigint NULL ,
[TransactionID] bigint NULL ,
[VoucherTypeNo] smallint NULL ,
[VoucherDate] datetime NULL ,
[VoucherPayee] nvarchar(50) NULL ,
[ApprovedBy] nvarchar(50) NULL ,
[OldAmount] float(53) NULL ,
[NewAmount] float(53) NULL ,
[IsApproved] bit NULL ,
[CreatedBy] uniqueidentifier NULL ,
[CreatedDate] datetime NULL ,
[ModifiedBy] uniqueidentifier NULL ,
[ModifiedDate] datetime NULL 
)


GO

-- ----------------------------
-- Records of ACCVoucherUpdate
-- ----------------------------

-- ----------------------------
-- Table structure for [dbo].[ADMAreaPO]
-- ----------------------------
DROP TABLE [dbo].[ADMAreaPO]
GO
CREATE TABLE [dbo].[ADMAreaPO] (
[AreaPOID] int NOT NULL IDENTITY(1,1) ,
[UpazilaPSID] int NOT NULL DEFAULT ((0)) ,
[AreaPOCode] nvarchar(12) NULL ,
[AreaPOName] nvarchar(128) NULL ,
[Description] nvarchar(MAX) NULL ,
[CreatedBy] uniqueidentifier NULL ,
[CreatedDate] datetime NULL ,
[ModifiedBy] uniqueidentifier NULL ,
[ModifiedDate] datetime NULL 
)


GO

-- ----------------------------
-- Records of ADMAreaPO
-- ----------------------------
SET IDENTITY_INSERT [dbo].[ADMAreaPO] ON
GO
SET IDENTITY_INSERT [dbo].[ADMAreaPO] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[ADMAreaVillage]
-- ----------------------------
DROP TABLE [dbo].[ADMAreaVillage]
GO
CREATE TABLE [dbo].[ADMAreaVillage] (
[AreaVillageID] int NOT NULL IDENTITY(1,1) ,
[AreaPOID] int NOT NULL DEFAULT ((0)) ,
[AreaVillageCode] nvarchar(12) NULL ,
[AreaVillageName] nvarchar(128) NULL ,
[Description] nvarchar(MAX) NULL ,
[CreatedBy] uniqueidentifier NULL ,
[CreatedDate] datetime NULL ,
[ModifiedBy] uniqueidentifier NULL ,
[ModifiedDate] datetime NULL 
)


GO

-- ----------------------------
-- Records of ADMAreaVillage
-- ----------------------------
SET IDENTITY_INSERT [dbo].[ADMAreaVillage] ON
GO
SET IDENTITY_INSERT [dbo].[ADMAreaVillage] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[ADMChamber]
-- ----------------------------
DROP TABLE [dbo].[ADMChamber]
GO
CREATE TABLE [dbo].[ADMChamber] (
[ChamberID] int NOT NULL IDENTITY(1,1) ,
[ChamberNo] nvarchar(16) NULL ,
[Floor] nvarchar(16) NULL ,
[PocketNo] int NULL ,
[Bags] float(53) NULL ,
[Remarks] nvarchar(MAX) NULL 
)


GO

-- ----------------------------
-- Records of ADMChamber
-- ----------------------------
SET IDENTITY_INSERT [dbo].[ADMChamber] ON
GO
SET IDENTITY_INSERT [dbo].[ADMChamber] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[ADMCompany]
-- ----------------------------
DROP TABLE [dbo].[ADMCompany]
GO
CREATE TABLE [dbo].[ADMCompany] (
[CompanyID] int NOT NULL IDENTITY(1,1) ,
[CompanyCode] nvarchar(8) NULL ,
[CompanyName] nvarchar(128) NULL ,
[CompanyAddress] nvarchar(MAX) NULL ,
[CompanyTel] nvarchar(128) NULL ,
[CompanyFax] nvarchar(128) NULL ,
[CompanyEmail] nvarchar(128) NULL ,
[CompanyURL] nvarchar(128) NULL ,
[ESTBDate] datetime NULL ,
[REGDate] datetime NULL ,
[IsActive] bit NULL ,
[CompanyLogo] image NULL ,
[OpeningBalance] float(53) NULL ,
[Currency] nvarchar(4) NULL ,
[IsAccountChart] bit NULL ,
[Description] nvarchar(MAX) NULL 
)


GO

-- ----------------------------
-- Records of ADMCompany
-- ----------------------------
SET IDENTITY_INSERT [dbo].[ADMCompany] ON
GO
SET IDENTITY_INSERT [dbo].[ADMCompany] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[ADMCountry]
-- ----------------------------
DROP TABLE [dbo].[ADMCountry]
GO
CREATE TABLE [dbo].[ADMCountry] (
[CountryID] int NOT NULL IDENTITY(1,1) ,
[CountryCode] nvarchar(2) NOT NULL ,
[CountryName] nvarchar(48) NULL ,
[ISDCode] nvarchar(4) NULL ,
[ModifiedBy] uniqueidentifier NULL ,
[ModifiedDate] datetime NULL 
)


GO
DBCC CHECKIDENT(N'[dbo].[ADMCountry]', RESEED, 239)
GO

-- ----------------------------
-- Records of ADMCountry
-- ----------------------------
SET IDENTITY_INSERT [dbo].[ADMCountry] ON
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'1', N'AD', N'Andorra ', N'376', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'2', N'AE', N'United Arab Emirates ', N'971', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'3', N'AF', N'Afghanistan ', N'93', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'4', N'AG', N'Antigua And Barbuda ', N'268', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'5', N'AI', N'Anguilla ', N'264', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'6', N'AL', N'Albania ', N'355', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'7', N'AM', N'Armenia ', N'374', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'8', N'AN', N'Netherlands Antilles ', N'599', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'9', N'AO', N'Angola ', N'244', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'10', N'AQ', N'Antarctica ', N'672', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'11', N'AR', N'Argentina ', N'54', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'12', N'AS', N'American Samoa ', N'684', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'13', N'AT', N'Austria ', N'43', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'14', N'AU', N'Australia ', N'61', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'15', N'AW', N'Aruba ', N'297', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'16', N'AZ', N'Azerbaijan ', N'994', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'17', N'BA', N'Bosnia And Herzegovina ', N'387', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'18', N'BB', N'Barbados ', N'246', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'19', N'BD', N'Bangladesh ', N'880', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'20', N'BE', N'Belgium ', N'32', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'21', N'BF', N'Burkina Faso ', N'226', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'22', N'BG', N'Bulgaria ', N'359', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'23', N'BH', N'Bahrain ', N'973', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'24', N'BI', N'Burundi ', N'257', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'25', N'BJ', N'Benin ', N'229', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'26', N'BM', N'Bermuda ', N'441', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'27', N'BN', N'Brunei Darussalam ', N'673', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'28', N'BO', N'Bolivia ', N'591', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'29', N'BR', N'Brazil ', N'55', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'30', N'BS', N'Bahamas ', N'242', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'31', N'BT', N'Bhutan ', N'975', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'32', N'BV', N'Bouvet Island ', null, null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'33', N'BW', N'Botswana ', N'267', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'34', N'BY', N'Belarus ', N'375', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'35', N'BZ', N'Belize ', N'501', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'36', N'CA', N'Canada ', N'1', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'37', N'CC', N'Cocos Keeling Islands ', N'61', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'38', N'CD', N'Congo, D.P.R ', N'243', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'39', N'CF', N'Central African Republic ', N'236', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'40', N'CG', N'Congo ', N'242', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'41', N'CH', N'Switzerland ', N'41', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'42', N'CI', N'Cote D''ivoire', N'225', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'43', N'CK', N'Cook Islands ', N'682', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'44', N'CL', N'Chile ', N'56', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'45', N'CM', N'Cameroon ', N'237', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'46', N'CN', N'China ', N'86', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'47', N'CO', N'Colombia ', N'57', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'48', N'CR', N'Costa Rica ', N'506', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'49', N'CU', N'Cuba ', N'53', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'50', N'CV', N'Cape Verde ', N'238', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'51', N'CX', N'Christmas Island ', N'618', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'52', N'CY', N'Cyprus ', N'357', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'53', N'CZ', N'Czech Republic ', N'420', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'54', N'DE', N'Germany ', N'49', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'55', N'DJ', N'Djibouti ', N'253', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'56', N'DK', N'Denmark ', N'45', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'57', N'DM', N'Dominica ', N'767', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'58', N'DO', N'Dominican Republic ', N'809', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'59', N'DZ', N'Algeria ', N'213', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'60', N'EC', N'Ecuador ', N'593', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'61', N'EE', N'Estonia ', N'372', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'62', N'EG', N'Egypt ', N'20', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'63', N'EH', N'Western Sahara ', null, null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'64', N'ER', N'Eritrea ', N'291', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'65', N'ES', N'Spain ', N'34', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'66', N'ET', N'Ethiopia ', N'251', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'67', N'FI', N'Finland ', N'358', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'68', N'FJ', N'Fiji ', N'679', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'69', N'FK', N'Falkland Islands Malvinas ', N'500', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'70', N'FM', N'Micronesia ', N'691', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'71', N'FO', N'Faroe Islands ', N'298', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'72', N'FR', N'France ', N'33', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'73', N'GA', N'Gabon ', N'241', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'74', N'GB', N'United Kingdom ', N'44', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'75', N'GD', N'Grenada ', N'473', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'76', N'GE', N'Georgia ', N'995', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'77', N'GF', N'French Guiana ', N'594', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'78', N'GH', N'Ghana ', N'233', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'79', N'GI', N'Gibraltar ', N'350', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'80', N'GL', N'Greenland ', N'299', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'81', N'GM', N'Gambia ', N'220', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'82', N'GN', N'Guinea ', N'224', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'83', N'GP', N'Guadeloupe ', N'590', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'84', N'GQ', N'Equatorial Guinea ', N'240', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'85', N'GR', N'Greece ', N'30', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'86', N'GS', N'South Georgia/Sandwich Islands ', null, null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'87', N'GT', N'Guatemala ', N'502', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'88', N'GU', N'Guam ', N'671', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'89', N'GW', N'Guinea-bissau ', N'245', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'90', N'GY', N'Guyana ', N'592', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'91', N'HK', N'Hong Kong ', N'852', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'92', N'HM', N'Heard And McDonald Islands ', null, null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'93', N'HN', N'Honduras ', N'504', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'94', N'HR', N'Croatia ', N'385', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'95', N'HT', N'Haiti ', N'509', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'96', N'HU', N'Hungary ', N'36', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'97', N'ID', N'Indonesia ', N'62', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'98', N'IE', N'Ireland ', N'353', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'99', N'IL', N'Israel ', N'972', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'100', N'IN', N'India ', N'91', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'101', N'IO', N'British Indian Ocean Territory ', null, null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'102', N'IQ', N'Iraq ', N'964', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'103', N'IR', N'Iran, Islamic Republic Of ', N'98', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'104', N'IS', N'Iceland ', N'354', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'105', N'IT', N'Italy ', N'39', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'106', N'JM', N'Jamaica ', N'876', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'107', N'JO', N'Jordan ', N'962', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'108', N'JP', N'Japan ', N'81', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'109', N'KE', N'Kenya ', N'254', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'110', N'KG', N'Kyrgyzstan ', N'996', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'111', N'KH', N'Cambodia ', N'855', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'112', N'KI', N'Kiribati ', N'686', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'113', N'KM', N'Comoros ', N'269', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'114', N'KN', N'Saint Kitts And Nevis ', N'869', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'115', N'KP', N'Korea, D.P.R. ', N'850', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'116', N'KR', N'Korea, Republic Of ', N'82', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'117', N'KW', N'Kuwait ', N'965', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'118', N'KY', N'Cayman Islands ', N'345', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'119', N'KZ', N'Kazakstan ', N'7', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'120', N'LA', N'Laos', N'856', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'121', N'LB', N'Lebanon ', N'961', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'122', N'LC', N'Saint Lucia ', N'758', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'123', N'LI', N'Liechtenstein ', N'423', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'124', N'LK', N'Sri Lanka ', N'94', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'125', N'LR', N'Liberia ', N'231', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'126', N'LS', N'Lesotho ', N'266', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'127', N'LT', N'Lithuania ', N'370', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'128', N'LU', N'Luxembourg ', N'352', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'129', N'LV', N'Latvia ', N'371', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'130', N'LY', N'Libyan Arab Jamahiriya ', N'218', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'131', N'MA', N'Morocco ', N'212', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'132', N'MC', N'Monaco ', N'377', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'133', N'MD', N'Moldova, Republic Of ', N'373', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'134', N'MG', N'Madagascar ', N'261', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'135', N'MH', N'Marshall Islands ', N'692', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'136', N'MK', N'Macedonia ', N'389', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'137', N'ML', N'Mali ', N'223', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'138', N'MM', N'Myanmar ', N'95', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'139', N'MN', N'Mongolia ', N'976', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'140', N'MO', N'Macau ', N'853', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'141', N'MP', N'Northern Mariana Islands ', N'670', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'142', N'MQ', N'Martinique ', N'596', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'143', N'MR', N'Mauritania ', N'222', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'144', N'MS', N'Montserrat ', N'664', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'145', N'MT', N'Malta ', N'356', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'146', N'MU', N'Mauritius ', N'230', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'147', N'MV', N'Maldives ', N'960', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'148', N'MW', N'Malawi ', N'265', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'149', N'MX', N'Mexico ', N'52', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'150', N'MY', N'Malaysia ', N'60', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'151', N'MZ', N'Mozambique ', N'258', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'152', N'NA', N'Namibia ', N'264', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'153', N'NC', N'New Caledonia ', N'687', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'154', N'NE', N'Niger ', N'227', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'155', N'NF', N'Norfolk Island ', N'672', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'156', N'NG', N'Nigeria ', N'234', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'157', N'NI', N'Nicaragua ', N'505', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'158', N'NL', N'Netherlands ', N'31', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'159', N'NO', N'Norway ', N'47', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'160', N'NP', N'Nepal ', N'977', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'161', N'NR', N'Nauru ', N'674', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'162', N'NU', N'Niue ', N'683', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'163', N'NZ', N'New Zealand ', N'64', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'164', N'OM', N'Oman ', N'968', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'165', N'PA', N'Panama ', N'507', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'166', N'PE', N'Peru ', N'51', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'167', N'PF', N'French Polynesia ', N'689', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'168', N'PG', N'Papua New Guinea ', N'675', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'169', N'PH', N'Philippines ', N'63', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'170', N'PK', N'Pakistan ', N'92', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'171', N'PL', N'Poland ', N'48', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'172', N'PM', N'Saint Pierre And Miquelon ', N'508', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'173', N'PN', N'Pitcairn ', null, null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'174', N'PR', N'Puerto Rico ', N'939', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'175', N'PS', N'Palestine ', N'970', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'176', N'PT', N'Portugal ', N'351', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'177', N'PW', N'Palau ', N'680', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'178', N'PY', N'Paraguay ', N'595', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'179', N'QA', N'Qatar ', N'974', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'180', N'RE', N'Reunion ', N'262', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'181', N'RO', N'Romania ', N'40', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'182', N'RU', N'Russian Federation ', N'7', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'183', N'RW', N'Rwanda ', N'250', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'184', N'SA', N'Saudi Arabia ', N'966', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'185', N'SB', N'Solomon Islands ', N'677', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'186', N'SC', N'Seychelles ', N'248', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'187', N'SD', N'Sudan ', N'249', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'188', N'SE', N'Sweden ', N'46', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'189', N'SG', N'Singapore ', N'65', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'190', N'SH', N'Saint Helena ', N'290', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'191', N'SI', N'Slovenia ', N'386', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'192', N'SJ', N'Svalbard And Jan Mayen ', null, null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'193', N'SK', N'Slovakia ', N'421', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'194', N'SL', N'Sierra Leone ', N'232', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'195', N'SM', N'San Marino ', N'378', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'196', N'SN', N'Senegal ', N'221', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'197', N'SO', N'Somalia ', N'252', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'198', N'SR', N'Suriname ', N'597', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'199', N'ST', N'Sao Tome And Principe ', N'239', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'200', N'SV', N'El Salvador ', N'503', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'201', N'SY', N'Syrian Arab Republic ', N'963', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'202', N'SZ', N'Swaziland ', N'268', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'203', N'TC', N'Turks And Caicos Islands ', N'649', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'204', N'TD', N'Chad ', N'235', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'205', N'TF', N'French Southern Territories ', null, null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'206', N'TG', N'Togo ', N'228', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'207', N'TH', N'Thailand ', N'66', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'208', N'TJ', N'Tajikistan ', N'992', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'209', N'TK', N'Tokelau ', N'690', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'210', N'TM', N'Turkmenistan ', N'993', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'211', N'TN', N'Tunisia ', N'216', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'212', N'TO', N'Tonga ', N'676', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'213', N'TP', N'East Timor ', N'670', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'214', N'TR', N'Turkey ', N'90', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'215', N'TT', N'Trinidad And Tobago ', N'868', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'216', N'TV', N'Tuvalu ', N'688', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'217', N'TW', N'Taiwan ', N'886', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'218', N'TZ', N'Tanzania, United Republic Of ', N'255', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'219', N'UA', N'Ukraine ', N'380', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'220', N'UG', N'Uganda ', N'256', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'221', N'UM', N'US Minor Outlying Islands ', null, null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'222', N'US', N'United States ', N'1', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'223', N'UY', N'Uruguay ', N'598', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'224', N'UZ', N'Uzbekistan ', N'998', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'225', N'VA', N'Vatican City ', N'379', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'226', N'VC', N'St Vincent/Grenadines ', N'784', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'227', N'VE', N'Venezuela ', N'58', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'228', N'VG', N'Virgin Islands, British ', N'284', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'229', N'VI', N'Virgin Islands, U.S. ', N'340', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'230', N'VN', N'Vietnam ', N'84', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'231', N'VU', N'Vanuatu ', N'678', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'232', N'WF', N'Wallis And Futuna ', N'681', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'233', N'WS', N'Samoa ', null, null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'234', N'YE', N'Yemen ', N'967', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'235', N'YT', N'Mayotte ', N'269', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'236', N'YU', N'Yugoslavia ', N'381', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'237', N'ZA', N'South Africa ', N'27', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'238', N'ZM', N'Zambia ', N'260', null, null);
GO
INSERT INTO [dbo].[ADMCountry] ([CountryID], [CountryCode], [CountryName], [ISDCode], [ModifiedBy], [ModifiedDate]) VALUES (N'239', N'ZW', N'Zimbabwe ', N'263', null, null);
GO
SET IDENTITY_INSERT [dbo].[ADMCountry] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[ADMDistrict]
-- ----------------------------
DROP TABLE [dbo].[ADMDistrict]
GO
CREATE TABLE [dbo].[ADMDistrict] (
[DistrictID] int NOT NULL ,
[DistrictCode] varchar(5) NULL ,
[DistrictName] varchar(50) NULL ,
[DistrictCodeName] varchar(150) NULL ,
[DivisionID] int NULL ,
[ModifiedBy] uniqueidentifier NULL ,
[ModifiedDate] datetime NULL 
)


GO

-- ----------------------------
-- Records of ADMDistrict
-- ----------------------------
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'1', N'BH', N'Bagerhat', N'BH - Bagerhat', N'6', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'2', N'BD', N'Bandarban', N'BD - Bandarban', N'3', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'3', N'BG', N'Barguna', N'BG - Barguna', N'2', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'4', N'BS', N'Barisal', N'BS - Barisal', N'2', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'5', N'BL', N'Bhola', N'BL - Bhola', N'2', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'6', N'BO', N'Bogra', N'BO - Bogra', N'5', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'7', N'BB', N'Brahmanbaria', N'BB - Brahmanbaria', N'3', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'8', N'CP', N'Chandpur', N'CP - Chandpur', N'3', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'9', N'CT', N'Chittagong', N'CT - Chittagong', N'3', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'10', N'CD', N'Chuadanga', N'CD - Chuadanga', N'6', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'11', N'CM', N'Comilla', N'CM - Comilla', N'3', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'12', N'CB', N'Cox''s Bazar', N'CB - Cox''s Bazar', N'3', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'13', N'DH', N'Dhaka', N'DH - Dhaka', N'1', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'14', N'DJ', N'Dinajpur', N'DJ - Dinajpur', N'4', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'15', N'FR', N'Faridpur', N'FR - Faridpur', N'1', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'16', N'FN', N'Feni', N'FN - Feni', N'3', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'17', N'GB', N'Gaibandha', N'GB - Gaibandha', N'4', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'18', N'GZ', N'Gazipur', N'GZ - Gazipur', N'1', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'19', N'GG', N'Gopalganj', N'GG - Gopalganj', N'1', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'20', N'HA', N'Habiganj', N'HA - Habiganj', N'7', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'21', N'JP', N'Jaipurhat', N'JP - Jaipurhat', N'5', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'22', N'JM', N'Jamalpur', N'JM - Jamalpur', N'1', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'23', N'JS', N'Jessore', N'JS - Jessore', N'6', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'24', N'JK', N'Jhalakati', N'JK - Jhalakati', N'2', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'25', N'JN', N'Jhenaidah', N'JN - Jhenaidah', N'6', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'26', N'KG', N'Khagrachari', N'KG - Khagrachari', N'3', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'27', N'KL', N'Khulna', N'KL - Khulna', N'6', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'28', N'KS', N'Kishoreganj', N'KS - Kishoreganj', N'1', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'29', N'KR', N'Kurigram', N'KR - Kurigram', N'4', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'30', N'KU', N'Kushtia', N'KU - Kushtia', N'6', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'31', N'LK', N'Lakshmipur', N'LK - Lakshmipur', N'3', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'32', N'LL', N'Lalmonirhat', N'LL - Lalmonirhat', N'4', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'33', N'MD', N'Madaripur', N'MD - Madaripur', N'1', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'34', N'MG', N'Magura', N'MG - Magura', N'6', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'35', N'MK', N'Manikganj', N'MK - Manikganj', N'1', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'36', N'ME', N'Meherpur', N'ME - Meherpur', N'6', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'37', N'MB', N'Moulvibazar', N'MB - Moulvibazar', N'7', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'38', N'MU', N'Munshiganj', N'MU - Munshiganj', N'1', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'39', N'MM', N'Mymensingh', N'MM - Mymensingh', N'1', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'40', N'NA', N'Naogaon', N'NA - Naogaon', N'5', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'41', N'NR', N'Narail', N'NR - Narail', N'6', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'42', N'NY', N'Narayanganj', N'NY - Narayanganj', N'1', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'43', N'NS', N'Narsingdi', N'NS - Narsingdi', N'1', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'44', N'NT', N'Natore', N'NT - Natore', N'5', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'45', N'NW', N'Nawabganj', N'NW - Nawabganj', N'5', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'46', N'NK', N'Netrakona', N'NK - Netrakona', N'1', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'47', N'NP', N'Nilphamari', N'NP - Nilphamari', N'4', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'48', N'NO', N'Noakhali', N'NO - Noakhali', N'3', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'49', N'PB', N'Pabna', N'PB - Pabna', N'5', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'50', N'PN', N'Panchagarh', N'PN - Panchagarh', N'4', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'51', N'PC', N'Parbattya Chattagram (Rangamati)', N'PC - Parbattya Chattagram', N'3', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'52', N'PT', N'Patuakhali', N'PT - Patuakhali', N'2', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'53', N'PR', N'Pirojpur', N'PR - Pirojpur', N'2', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'54', N'RB', N'Rajbari', N'RB - Rajbari', N'1', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'55', N'RS', N'Rajshahi', N'RS - Rajshahi', N'5', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'56', N'RP', N'Rangpur', N'RP - Rangpur', N'4', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'57', N'ST', N'Satkhira', N'ST - Satkhira', N'6', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'58', N'SA', N'Shariatpur', N'SA - Shariatpur', N'1', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'59', N'SP', N'Sherpur', N'SP - Sherpur', N'1', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'60', N'SR', N'Sirajganj', N'SR - Sirajganj', N'5', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'61', N'SN', N'Sunamganj', N'SN - Sunamganj', N'7', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'62', N'SL', N'Sylhet', N'SL - Sylhet', N'7', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'63', N'TA', N'Tangail', N'TA - Tangail', N'1', null, null);
GO
INSERT INTO [dbo].[ADMDistrict] ([DistrictID], [DistrictCode], [DistrictName], [DistrictCodeName], [DivisionID], [ModifiedBy], [ModifiedDate]) VALUES (N'64', N'TH', N'Thakurgaon', N'TH - Thakurgaon', N'4', null, null);
GO

-- ----------------------------
-- Table structure for [dbo].[ADMDivision]
-- ----------------------------
DROP TABLE [dbo].[ADMDivision]
GO
CREATE TABLE [dbo].[ADMDivision] (
[DivisionID] int NOT NULL ,
[DivisionCode] varchar(5) NULL ,
[DivisionName] varchar(50) NULL ,
[DivisionCodeName] varchar(150) NULL ,
[CountryID] int NULL ,
[ModifiedBy] uniqueidentifier NULL ,
[ModifiedDate] datetime NULL 
)


GO

-- ----------------------------
-- Records of ADMDivision
-- ----------------------------
INSERT INTO [dbo].[ADMDivision] ([DivisionID], [DivisionCode], [DivisionName], [DivisionCodeName], [CountryID], [ModifiedBy], [ModifiedDate]) VALUES (N'1', N'DH', N'Dhaka', N'DH - Dhaka', N'19', null, null);
GO
INSERT INTO [dbo].[ADMDivision] ([DivisionID], [DivisionCode], [DivisionName], [DivisionCodeName], [CountryID], [ModifiedBy], [ModifiedDate]) VALUES (N'2', N'BA', N'Barishal', N'BA - Barishal', N'19', null, null);
GO
INSERT INTO [dbo].[ADMDivision] ([DivisionID], [DivisionCode], [DivisionName], [DivisionCodeName], [CountryID], [ModifiedBy], [ModifiedDate]) VALUES (N'3', N'CG', N'Chittagong', N'CG - Chittagong', N'19', null, null);
GO
INSERT INTO [dbo].[ADMDivision] ([DivisionID], [DivisionCode], [DivisionName], [DivisionCodeName], [CountryID], [ModifiedBy], [ModifiedDate]) VALUES (N'4', N'RP', N'Rangpur', N'RP - Rangpur', N'19', null, null);
GO
INSERT INTO [dbo].[ADMDivision] ([DivisionID], [DivisionCode], [DivisionName], [DivisionCodeName], [CountryID], [ModifiedBy], [ModifiedDate]) VALUES (N'5', N'RS', N'Rajshahi', N'RS - Rajshahi', N'19', null, null);
GO
INSERT INTO [dbo].[ADMDivision] ([DivisionID], [DivisionCode], [DivisionName], [DivisionCodeName], [CountryID], [ModifiedBy], [ModifiedDate]) VALUES (N'6', N'KH', N'Khulna', N'KH - Khulna', N'19', null, null);
GO
INSERT INTO [dbo].[ADMDivision] ([DivisionID], [DivisionCode], [DivisionName], [DivisionCodeName], [CountryID], [ModifiedBy], [ModifiedDate]) VALUES (N'7', N'SY', N'Sylhet', N'SY - Sylhet', N'19', null, null);
GO

-- ----------------------------
-- Table structure for [dbo].[ADMPermission]
-- ----------------------------
DROP TABLE [dbo].[ADMPermission]
GO
CREATE TABLE [dbo].[ADMPermission] (
[PermissionID] bigint NOT NULL IDENTITY(1,1) ,
[ModuleName] nvarchar(64) NULL ,
[UIName] nvarchar(128) NULL 
)


GO

-- ----------------------------
-- Records of ADMPermission
-- ----------------------------
SET IDENTITY_INSERT [dbo].[ADMPermission] ON
GO
SET IDENTITY_INSERT [dbo].[ADMPermission] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[ADMUnit]
-- ----------------------------
DROP TABLE [dbo].[ADMUnit]
GO
CREATE TABLE [dbo].[ADMUnit] (
[UnitID] int NOT NULL IDENTITY(1,1) ,
[UnitCode] nvarchar(8) NULL ,
[UnitName] nvarchar(64) NULL ,
[Description] nvarchar(MAX) NULL 
)


GO

-- ----------------------------
-- Records of ADMUnit
-- ----------------------------
SET IDENTITY_INSERT [dbo].[ADMUnit] ON
GO
SET IDENTITY_INSERT [dbo].[ADMUnit] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[ADMUnitCoversion]
-- ----------------------------
DROP TABLE [dbo].[ADMUnitCoversion]
GO
CREATE TABLE [dbo].[ADMUnitCoversion] (
[UnitConvID] int NOT NULL IDENTITY(1,1) ,
[UnitQty] int NULL ,
[UnitID] int NULL ,
[ConvQty] float(53) NULL ,
[ConvID] int NULL ,
[Description] nvarchar(MAX) NULL 
)


GO

-- ----------------------------
-- Records of ADMUnitCoversion
-- ----------------------------
SET IDENTITY_INSERT [dbo].[ADMUnitCoversion] ON
GO
SET IDENTITY_INSERT [dbo].[ADMUnitCoversion] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[ADMUpazilaPS]
-- ----------------------------
DROP TABLE [dbo].[ADMUpazilaPS]
GO
CREATE TABLE [dbo].[ADMUpazilaPS] (
[UpazilaPSID] int NOT NULL IDENTITY(1,1) ,
[DistrictID] int NOT NULL DEFAULT ((0)) ,
[UpazilaPSCode] nvarchar(12) NULL ,
[UpazilaPSName] nvarchar(64) NULL ,
[Description] nvarchar(MAX) NULL ,
[CreatedBy] uniqueidentifier NULL ,
[CreatedDate] datetime NULL ,
[ModifiedBy] uniqueidentifier NULL ,
[ModifiedDate] datetime NULL 
)


GO
DBCC CHECKIDENT(N'[dbo].[ADMUpazilaPS]', RESEED, 485)
GO

-- ----------------------------
-- Records of ADMUpazilaPS
-- ----------------------------
SET IDENTITY_INSERT [dbo].[ADMUpazilaPS] ON
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'1', N'1', null, N'Bagerhat Sadar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'2', N'1', null, N'Chitalmari', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'3', N'1', null, N'Fakirhat', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'4', N'1', null, N'Kachua', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'5', N'1', null, N'Mollarhat', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'6', N'1', null, N'Mongla', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'7', N'1', null, N'Morelganj', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'8', N'1', null, N'Rampal', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'9', N'1', null, N'Sarankhola', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'10', N'2', null, N'Ali Kadam', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'11', N'2', null, N'Bandarban Sadar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'12', N'2', null, N'Lama', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'13', N'2', null, N'Naikhoyngchari', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'14', N'2', null, N'Rawanchari', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'15', N'2', null, N'Ruma', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'16', N'2', null, N'Thanchi', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'17', N'3', null, N'Amtali', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'18', N'3', null, N'Bamna', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'19', N'3', null, N'Barguna Sadar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'20', N'3', null, N'Betagi', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'21', N'3', null, N'Patharghata', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'22', N'3', null, N'Taltali', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'23', N'4', null, N'Agailjhara', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'24', N'4', null, N'Babuganj', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'25', N'4', null, N'Bakerganj', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'26', N'4', null, N'Banaripara', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'27', N'4', null, N'Barisal Sadar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'28', N'4', null, N'Gournadi', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'29', N'4', null, N'Hijla', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'30', N'4', null, N'Mehendiganj', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'31', N'4', null, N'Muladi', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'32', N'4', null, N'Wazirpur', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'33', N'5', null, N'Bhola Sadar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'34', N'5', null, N'Borhanuddin', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'35', N'5', null, N'Charfession', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'36', N'5', null, N'Daulatkhan', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'37', N'5', null, N'Lalmohan', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'38', N'5', null, N'Manpura', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'39', N'5', null, N'Tajumuddin', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'40', N'6', null, N'Adamdighi', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'41', N'6', null, N'Bogra Sadar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'42', N'6', null, N'Dhunot', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'43', N'6', null, N'Dhubchanchia', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'44', N'6', null, N'Gabtali', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'45', N'6', null, N'Kahaloo', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'46', N'6', null, N'Nandigram', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'47', N'6', null, N'Sariakandi', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'48', N'6', null, N'Sherpur', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'49', N'6', null, N'Shibganj', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'50', N'6', null, N'Sonatola', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'51', N'6', null, N'Shajahanpur', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'52', N'7', null, N'Akhaura', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'53', N'7', null, N'Ashuganj', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'54', N'7', null, N'Bancharampur', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'55', N'7', null, N'Brahmanbaria Sadar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'56', N'7', null, N'Kashba', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'57', N'7', null, N'Nabinagar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'58', N'7', null, N'Nasirnagar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'59', N'7', null, N'Sarail', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'60', N'7', null, N'Bijoy Nagor', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'61', N'8', null, N'Chandpur Sadar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'62', N'8', null, N'Faridganj', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'63', N'8', null, N'Haimchar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'64', N'8', null, N'Hajiganj', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'65', N'8', null, N'Kachua', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'66', N'8', null, N'Matlab (South)', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'67', N'8', null, N'Matlab (North)(Chengarchar)', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'68', N'8', null, N'Shahrasti', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'69', N'9', null, N'Anwara', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'70', N'9', null, N'Banshkhali', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'71', N'9', null, N'Boalkhali', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'72', N'9', null, N'Chandanaish', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'73', N'9', null, N'Fatikchari', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'74', N'9', null, N'Hathazari', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'75', N'9', null, N'Lohagara', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'76', N'9', null, N'Mirsarai', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'77', N'9', null, N'Patiya', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'78', N'9', null, N'Rangunia', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'79', N'9', null, N'Raujan', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'80', N'9', null, N'Sandwip', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'81', N'9', null, N'Satkania', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'82', N'9', null, N'Sitakundu', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'83', N'10', null, N'Alamdanga', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'84', N'10', null, N'Chuadanga Sadar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'85', N'10', null, N'Damurhuda', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'86', N'10', null, N'Jibannagar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'87', N'11', null, N'Barura', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'88', N'11', null, N'Brahmanpara', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'89', N'11', null, N'Burichang', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'90', N'11', null, N'Chandina', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'91', N'11', null, N'Chowddagram', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'92', N'11', null, N'Comilla Sadar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'93', N'11', null, N'Daudkandi', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'94', N'11', null, N'Debiduar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'95', N'11', null, N'Homna', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'96', N'11', null, N'Laksam', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'97', N'11', null, N'Meghna', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'98', N'11', null, N'Muradnagar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'99', N'11', null, N'Nangolkot', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'100', N'11', null, N'Titas', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'101', N'11', null, N'Monoharganj', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'102', N'11', null, N'Comilla Sadar South', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'103', N'12', null, N'Chakoria', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'104', N'12', null, N'Cox''s Bazar Sadar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'105', N'12', null, N'Kutubdia', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'106', N'12', null, N'Moheshkhali', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'107', N'12', null, N'Pekua', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'108', N'12', null, N'Ramu', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'109', N'12', null, N'Teknaf', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'110', N'12', null, N'Ukhia', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'111', N'13', null, N'Dhamrai', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'112', N'13', null, N'Dohar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'113', N'13', null, N'Keraniganj', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'114', N'13', null, N'Nawabganj', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'115', N'13', null, N'Savar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'116', N'14', null, N'Birampur', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'117', N'14', null, N'Birganj', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'118', N'14', null, N'Birol', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'119', N'14', null, N'Bochaganj', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'120', N'14', null, N'Chirirbandar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'121', N'14', null, N'Dinajpur Sadar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'122', N'14', null, N'Phulbari', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'123', N'14', null, N'Ghoraghat', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'124', N'14', null, N'Hakimpur', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'125', N'14', null, N'Kaharole', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'126', N'14', null, N'Khanshama', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'127', N'14', null, N'Nawabganj', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'128', N'14', null, N'Parbatipur', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'129', N'15', null, N'Alfadanga', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'130', N'15', null, N'Bhanga', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'131', N'15', null, N'Boalmari', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'132', N'15', null, N'Char Bhadrasan', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'133', N'15', null, N'Faridpur Sadar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'134', N'15', null, N'Madhukhali', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'135', N'15', null, N'Nagarkanda', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'136', N'15', null, N'Sadarpur', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'137', N'15', null, N'Saltha', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'138', N'16', null, N'Chagalnayya', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'139', N'16', null, N'Daganbhuiyan', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'140', N'16', null, N'Feni Sadar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'141', N'16', null, N'Parshuram', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'142', N'16', null, N'Fulgazi', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'143', N'16', null, N'Sonagazi', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'144', N'17', null, N'Fulchari', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'145', N'17', null, N'Gaibandha Sadar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'146', N'17', null, N'Gobindaganj', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'147', N'17', null, N'Palashbari', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'148', N'17', null, N'Sadullapur', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'149', N'17', null, N'Shaghatta', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'150', N'17', null, N'Sundarganj', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'151', N'18', null, N'Gazipur Sadar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'152', N'18', null, N'Kaliakoir', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'153', N'18', null, N'Kaliganj', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'154', N'18', null, N'Kapasia', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'155', N'18', null, N'Sreepur', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'156', N'19', null, N'Gopalganj Sadar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'157', N'19', null, N'Kasiani', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'158', N'19', null, N'Kotalipara', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'159', N'19', null, N'Maksudpur', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'160', N'19', null, N'Tungipara', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'161', N'20', null, N'Ajmeriganj', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'162', N'20', null, N'Bahubal', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'163', N'20', null, N'Baniachang', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'164', N'20', null, N'Chunarughat', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'165', N'20', null, N'Habiganj Sadar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'166', N'20', null, N'Lakhai', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'167', N'20', null, N'Madhabpur', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'168', N'20', null, N'Nabiganj', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'169', N'21', null, N'Akkelpur', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'170', N'21', null, N'Joypurhat Sadar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'171', N'21', null, N'Kalai', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'172', N'21', null, N'Khetlal', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'173', N'21', null, N'Panchbibi', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'174', N'22', null, N'Bakshiganj', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'175', N'22', null, N'Dewanganj', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'176', N'22', null, N'Islampur', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'177', N'22', null, N'Jamalpur Sadar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'178', N'22', null, N'Madarganj', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'179', N'22', null, N'Melandah', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'180', N'22', null, N'Sharishabari', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'181', N'23', null, N'Abhoynagar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'182', N'23', null, N'Bagherpara', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'183', N'23', null, N'Chowgacha', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'184', N'23', null, N'Jessore Sadar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'185', N'23', null, N'Jhikargacha', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'186', N'23', null, N'Keshabpur', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'187', N'23', null, N'Manirampur', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'188', N'23', null, N'Sharsha', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'189', N'24', null, N'Jhalokathi Sadar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'190', N'24', null, N'Kathalia', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'191', N'24', null, N'Nalchiti', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'192', N'24', null, N'Rajapur', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'193', N'25', null, N'Kotchandpur', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'194', N'25', null, N'Harinakunda', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'195', N'25', null, N'Jhenaidah Sadar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'196', N'25', null, N'Kaliganj', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'197', N'25', null, N'Moheshpur', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'198', N'25', null, N'Shailkupa', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'199', N'26', null, N'Dighinala', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'200', N'26', null, N'Khagrachari Sadar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'201', N'26', null, N'Laksmichari', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'202', N'26', null, N'Mohalchari', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'203', N'26', null, N'Manikchari', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'204', N'26', null, N'Matiranga', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'205', N'26', null, N'Panchari', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'206', N'26', null, N'Ramgor', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'207', N'27', null, N'Batiaghata', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'208', N'27', null, N'Dacope', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'209', N'27', null, N'Dighalia', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'210', N'27', null, N'Dumuria', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'211', N'27', null, N'Phultala', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'212', N'27', null, N'Koira', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'213', N'27', null, N'Paikgacha', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'214', N'27', null, N'Rupsa', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'215', N'27', null, N'Terokhada', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'216', N'28', null, N'Austogram', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'217', N'28', null, N'Bajitpur', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'218', N'28', null, N'Bhairab', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'219', N'28', null, N'Hosainpur', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'220', N'28', null, N'Itna', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'221', N'28', null, N'Karimganj', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'222', N'28', null, N'Katiadi', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'223', N'28', null, N'Kishoreganj Sadar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'224', N'28', null, N'Kuliarchar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'225', N'28', null, N'Mithamain', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'226', N'28', null, N'Nikli', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'227', N'28', null, N'Pakundia', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'228', N'28', null, N'Tarail', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'229', N'29', null, N'Bhurungamari', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'230', N'29', null, N'Chilmary', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'231', N'29', null, N'Fulbari', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'232', N'29', null, N'Kurigram Sadar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'233', N'29', null, N'Nageswari', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'234', N'29', null, N'Rajarhat', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'235', N'29', null, N'Rajibpur', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'236', N'29', null, N'Rowmari', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'237', N'29', null, N'Ulipur', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'238', N'30', null, N'Bheramara', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'239', N'30', null, N'Daulatpur', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'240', N'30', null, N'Khoksha', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'241', N'30', null, N'Kumarkhali', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'242', N'30', null, N'Kushtia Sadar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'243', N'30', null, N'Mirpur', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'244', N'31', null, N'Laksmipur Sadar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'245', N'31', null, N'Ramgati', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'246', N'31', null, N'Ramganj', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'247', N'31', null, N'Raipur', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'248', N'31', null, N'Kamalnagar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'249', N'32', null, N'Aditmari', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'250', N'32', null, N'Hatibandha', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'251', N'32', null, N'Kaliganj', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'252', N'32', null, N'Lalmonirhat Sadar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'253', N'32', null, N'Patgram', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'254', N'33', null, N'Kalkini', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'255', N'33', null, N'Madaripur Sadar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'256', N'33', null, N'Rajoir', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'257', N'33', null, N'Shibchar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'258', N'34', null, N'Magura Sadar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'259', N'34', null, N'Mohammadpur', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'260', N'34', null, N'Shalikha', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'261', N'34', null, N'Sreepur', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'262', N'35', null, N'Daulatpur', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'263', N'35', null, N'Ghior', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'264', N'35', null, N'Harirampur', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'265', N'35', null, N'Manikganj Sadar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'266', N'35', null, N'Saturia', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'267', N'35', null, N'Shibalaya', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'268', N'35', null, N'Singair', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'269', N'36', null, N'Gangni', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'270', N'36', null, N'Meherpur Sadar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'271', N'36', null, N'Mujibnagar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'272', N'37', null, N'Barlekha', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'273', N'37', null, N'Kamalganj', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'274', N'37', null, N'Kulaura', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'275', N'37', null, N'Moulvibazar Sadar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'276', N'37', null, N'Rajnagar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'277', N'37', null, N'Sreemongal', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'278', N'37', null, N'Juri', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'279', N'38', null, N'Gazaria', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'280', N'38', null, N'Lauhajang', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'281', N'38', null, N'Munshiganj Sadar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'282', N'38', null, N'Serajdikhan', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'283', N'38', null, N'Sreenagar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'284', N'38', null, N'Tangibari', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'285', N'39', null, N'Bhaluka', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'286', N'39', null, N'Dhubaura', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'287', N'39', null, N'Fulbaria', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'288', N'39', null, N'Fulpur', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'289', N'39', null, N'Goffargaon', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'290', N'39', null, N'Gouripur', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'291', N'39', null, N'Haluaghat', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'292', N'39', null, N'Iswarganj', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'293', N'39', null, N'Mymensingh Sadar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'294', N'39', null, N'Muktagacha', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'295', N'39', null, N'Nandail', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'296', N'39', null, N'Trishal', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'297', N'40', null, N'Atrai', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'298', N'40', null, N'Badalgachi', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'299', N'40', null, N'Dhamoirhat', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'300', N'40', null, N'Manda', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'301', N'40', null, N'Mahadebpur', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'302', N'40', null, N'Naogaon Sadar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'303', N'40', null, N'Niamatpur', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'304', N'40', null, N'Patnitala', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'305', N'40', null, N'Porsha', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'306', N'40', null, N'Raninagar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'307', N'40', null, N'Shapahar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'308', N'41', null, N'Kalia', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'309', N'41', null, N'Lohagara', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'310', N'41', null, N'Narail Sadar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'311', N'42', null, N'Araihazar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'312', N'42', null, N'Bandar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'313', N'42', null, N'Narayanganj Sadar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'314', N'42', null, N'Rupganj', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'315', N'42', null, N'Sonargaon', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'316', N'43', null, N'Belabo', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'317', N'43', null, N'Monohardi', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'318', N'43', null, N'Norshingdi Sadar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'319', N'43', null, N'Palash', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'320', N'43', null, N'Raipura', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'321', N'43', null, N'Shibpur', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'322', N'44', null, N'Baghatipara', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'323', N'44', null, N'Baraigram', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'324', N'44', null, N'Gurudaspur', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'325', N'44', null, N'Lalpur', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'326', N'44', null, N'Natore Sadar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'327', N'44', null, N'Singra', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'328', N'45', null, N'Bholahat', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'329', N'45', null, N'Gomastapur', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'330', N'45', null, N'Nachole', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'331', N'45', null, N'Nawabganj Sadar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'332', N'45', null, N'Shibganj', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'333', N'46', null, N'Atpara', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'334', N'46', null, N'Barhatta', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'335', N'46', null, N'Durgapur', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'336', N'46', null, N'Kalmakanda', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'337', N'46', null, N'Kendua', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'338', N'46', null, N'Khaliajuri', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'339', N'46', null, N'Madan', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'340', N'46', null, N'Mohanganj', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'341', N'46', null, N'Netrokona Sadar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'342', N'46', null, N'Purbadhala', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'343', N'47', null, N'Dimla', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'344', N'47', null, N'Domar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'345', N'47', null, N'Jaldhaka', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'346', N'47', null, N'Kishoreganj', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'347', N'47', null, N'Nilphamari Sadar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'348', N'47', null, N'Saidpur', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'349', N'48', null, N'Begumganj', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'350', N'48', null, N'Chatkhil', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'351', N'48', null, N'Companiganj', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'352', N'48', null, N'Hatiya', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'353', N'48', null, N'Noakhali Sadar(Sudharam)', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'354', N'48', null, N'Senbag', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'355', N'48', null, N'Sonaimuri', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'356', N'48', null, N'Subarnachar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'357', N'48', null, N'Kabir Hat', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'358', N'49', null, N'Atgharia', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'359', N'49', null, N'Bera', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'360', N'49', null, N'Bhangura', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'361', N'49', null, N'Chatmohar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'362', N'49', null, N'Faridpur', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'363', N'49', null, N'Iswardi', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'364', N'49', null, N'Pabna Sadar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'365', N'49', null, N'Santhia', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'366', N'49', null, N'Sujanagar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'367', N'50', null, N'Atwari', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'368', N'50', null, N'Boda', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'369', N'50', null, N'Debiganj', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'370', N'50', null, N'Panchagarh Sadar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'371', N'50', null, N'Tetulia', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'372', N'51', null, N'Baghaichari', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'373', N'51', null, N'Barkal', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'374', N'51', null, N'Belaichari', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'375', N'51', null, N'Jurachari', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'376', N'51', null, N'Kaptai', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'377', N'51', null, N'Kawkhali', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'378', N'51', null, N'Langadu', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'379', N'51', null, N'Naniarchar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'380', N'51', null, N'Rajasthali', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'381', N'51', null, N'Rangamati Sadar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'382', N'52', null, N'Bauphal', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'383', N'52', null, N'Dasmina', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'384', N'52', null, N'Dumki', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'385', N'52', null, N'Galachipa', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'386', N'52', null, N'Kalapara', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'387', N'52', null, N'Mirjaganj', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'388', N'52', null, N'Patuakhali Sadar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'389', N'52', null, N'Rangabali', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'390', N'53', null, N'Bhandaria', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'391', N'53', null, N'Kaukhali', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'392', N'53', null, N'Mothbaria', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'393', N'53', null, N'Nesarabad (Shawrupkathi)', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'394', N'53', null, N'Nazirpur', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'395', N'53', null, N'Perojpur Sadar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'396', N'53', null, N'Zia Nagar (Indurkani)', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'397', N'54', null, N'Baliakandi', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'398', N'54', null, N'Goalunda', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'399', N'54', null, N'Pangsha', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'400', N'54', null, N'Rajbari Sadar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'401', N'54', null, N'Kalukhale', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'402', N'55', null, N'Bagha', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'403', N'55', null, N'Bagmara', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'404', N'55', null, N'Charghat', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'405', N'55', null, N'Durgapur', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'406', N'55', null, N'Godagari', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'407', N'55', null, N'Mohanpur', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'408', N'55', null, N'Paba', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'409', N'55', null, N'Putia', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'410', N'55', null, N'Tanore', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'411', N'56', null, N'Badarganj', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'412', N'56', null, N'Gangachara', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'413', N'56', null, N'Kaunia', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'414', N'56', null, N'Mithapukur', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'415', N'56', null, N'Pirgacha', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'416', N'56', null, N'Pirganj', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'417', N'56', null, N'Rangpur Sadar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'418', N'56', null, N'Taraganj', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'419', N'57', null, N'Assasuni', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'420', N'57', null, N'Debhata', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'421', N'57', null, N'Kaliganj', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'422', N'57', null, N'Kolaroa', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'423', N'57', null, N'Satkhira Sadar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'424', N'57', null, N'Shyamnagar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'425', N'57', null, N'Tala', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'426', N'58', null, N'Bhedarganj', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'427', N'58', null, N'Damudiya', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'428', N'58', null, N'Gosairhat', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'429', N'58', null, N'Zajira', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'430', N'58', null, N'Naria', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'431', N'58', null, N'Shariatpur Sadar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'432', N'59', null, N'Jhenaigati', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'433', N'59', null, N'Nakla', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'434', N'59', null, N'Nalitabari', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'435', N'59', null, N'Sherpur Sadar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'436', N'59', null, N'Sribordi', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'437', N'60', null, N'Belkuchi', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'438', N'60', null, N'Chowhali', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'439', N'60', null, N'Kamarkhanda', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'440', N'60', null, N'Kazipur', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'441', N'60', null, N'Raiganj', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'442', N'60', null, N'Shahajadpur', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'443', N'60', null, N'Serajganj Sadar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'444', N'60', null, N'Tarash', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'445', N'60', null, N'Ullapara', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'446', N'61', null, N'Biswambharpur', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'447', N'61', null, N'Chattak', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'448', N'61', null, N'Derai', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'449', N'61', null, N'Dharmapasha', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'450', N'61', null, N'Dowarabazar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'451', N'61', null, N'Jagannathpur', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'452', N'61', null, N'Jamalganj', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'453', N'61', null, N'Sulla', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'454', N'61', null, N'Sunamganj Sadar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'455', N'61', null, N'Taherpur', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'456', N'61', null, N'South Sunamganj', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'457', N'62', null, N'Balaganj', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'458', N'62', null, N'Beanibazar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'459', N'62', null, N'Biswanath', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'460', N'62', null, N'Companyganj', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'461', N'62', null, N'Fenchuganj', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'462', N'62', null, N'Gowainghat', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'463', N'62', null, N'Golapganj', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'464', N'62', null, N'Jaintapur', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'465', N'62', null, N'Kanaighat', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'466', N'62', null, N'Sylhet Sadar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'467', N'62', null, N'South Surma', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'468', N'62', null, N'Zakiganj', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'469', N'63', null, N'Bashail', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'470', N'63', null, N'Bhuapur', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'471', N'63', null, N'Delduar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'472', N'63', null, N'Ghatail', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'473', N'63', null, N'Gopalpur', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'474', N'63', null, N'Kalihati', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'475', N'63', null, N'Mirzapur', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'476', N'63', null, N'Modhupur', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'477', N'63', null, N'Nagarpur', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'478', N'63', null, N'Shakhipur', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'479', N'63', null, N'Tangail Sadar', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'480', N'63', null, N'Dhanbari', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'481', N'64', null, N'Baliadangi', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'482', N'64', null, N'Haripur', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'483', N'64', null, N'Pirganj', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'484', N'64', null, N'Ranishankail', null, null, null, null, null);
GO
INSERT INTO [dbo].[ADMUpazilaPS] ([UpazilaPSID], [DistrictID], [UpazilaPSCode], [UpazilaPSName], [Description], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'485', N'64', null, N'Thakurgaon Sadar', null, null, null, null, null);
GO
SET IDENTITY_INSERT [dbo].[ADMUpazilaPS] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[ADMUserPermission]
-- ----------------------------
DROP TABLE [dbo].[ADMUserPermission]
GO
CREATE TABLE [dbo].[ADMUserPermission] (
[UserID] uniqueidentifier NOT NULL ,
[PermissionID] bigint NULL ,
[IsView] bit NULL ,
[IsEdit] bit NULL ,
[IsDelete] bit NULL ,
[IsAdmin] bit NULL ,
[CreatedBy] uniqueidentifier NULL ,
[CreatedDate] datetime NULL ,
[ModifiedBy] uniqueidentifier NULL ,
[ModifiedDate] datetime NULL 
)


GO

-- ----------------------------
-- Records of ADMUserPermission
-- ----------------------------

-- ----------------------------
-- Table structure for [dbo].[aspnet_Applications]
-- ----------------------------
DROP TABLE [dbo].[aspnet_Applications]
GO
CREATE TABLE [dbo].[aspnet_Applications] (
[ApplicationName] nvarchar(256) NOT NULL ,
[LoweredApplicationName] nvarchar(256) NOT NULL ,
[ApplicationId] uniqueidentifier NOT NULL DEFAULT (newid()) ,
[Description] nvarchar(256) NULL 
)


GO

-- ----------------------------
-- Records of aspnet_Applications
-- ----------------------------
INSERT INTO [dbo].[aspnet_Applications] ([ApplicationName], [LoweredApplicationName], [ApplicationId], [Description]) VALUES (N'/', N'/', N'78A33403-26D7-40D8-B36A-1E18E55B530E', null);
GO
INSERT INTO [dbo].[aspnet_Applications] ([ApplicationName], [LoweredApplicationName], [ApplicationId], [Description]) VALUES (N'CSMSys', N'csmsys', N'EB04F28B-F63A-4898-9862-9B72AFDBA4F7', null);
GO

-- ----------------------------
-- Table structure for [dbo].[aspnet_Membership]
-- ----------------------------
DROP TABLE [dbo].[aspnet_Membership]
GO
CREATE TABLE [dbo].[aspnet_Membership] (
[ApplicationId] uniqueidentifier NOT NULL ,
[UserId] uniqueidentifier NOT NULL ,
[Password] nvarchar(128) NOT NULL ,
[PasswordFormat] int NOT NULL DEFAULT ((0)) ,
[PasswordSalt] nvarchar(128) NOT NULL ,
[MobilePIN] nvarchar(16) NULL ,
[Email] nvarchar(256) NULL ,
[LoweredEmail] nvarchar(256) NULL ,
[PasswordQuestion] nvarchar(256) NULL ,
[PasswordAnswer] nvarchar(128) NULL ,
[IsApproved] bit NOT NULL ,
[IsLockedOut] bit NOT NULL ,
[CreateDate] datetime NOT NULL ,
[LastLoginDate] datetime NOT NULL ,
[LastPasswordChangedDate] datetime NOT NULL ,
[LastLockoutDate] datetime NOT NULL ,
[FailedPasswordAttemptCount] int NOT NULL ,
[FailedPasswordAttemptWindowStart] datetime NOT NULL ,
[FailedPasswordAnswerAttemptCount] int NOT NULL ,
[FailedPasswordAnswerAttemptWindowStart] datetime NOT NULL ,
[Comment] ntext NULL 
)


GO

-- ----------------------------
-- Records of aspnet_Membership
-- ----------------------------
INSERT INTO [dbo].[aspnet_Membership] ([ApplicationId], [UserId], [Password], [PasswordFormat], [PasswordSalt], [MobilePIN], [Email], [LoweredEmail], [PasswordQuestion], [PasswordAnswer], [IsApproved], [IsLockedOut], [CreateDate], [LastLoginDate], [LastPasswordChangedDate], [LastLockoutDate], [FailedPasswordAttemptCount], [FailedPasswordAttemptWindowStart], [FailedPasswordAnswerAttemptCount], [FailedPasswordAnswerAttemptWindowStart], [Comment]) VALUES (N'EB04F28B-F63A-4898-9862-9B72AFDBA4F7', N'CA2E9B7C-6E06-431C-8F60-E0304446B88F', N'/0r7dwd4Q1k0rfHc4VzEUQ+HuZU=', N'1', N'Zghwjjs1DlkGczHxq+2OLQ==', null, N'inventory@csmvertex.com', N'inventory@csmvertex.com', null, null, N'1', N'0', N'2013-01-27 06:40:07.000', N'2013-01-27 06:40:07.180', N'2013-01-27 06:40:07.000', N'1754-01-01 00:00:00.000', N'0', N'1754-01-01 00:00:00.000', N'0', N'1754-01-01 00:00:00.000', null);
GO
INSERT INTO [dbo].[aspnet_Membership] ([ApplicationId], [UserId], [Password], [PasswordFormat], [PasswordSalt], [MobilePIN], [Email], [LoweredEmail], [PasswordQuestion], [PasswordAnswer], [IsApproved], [IsLockedOut], [CreateDate], [LastLoginDate], [LastPasswordChangedDate], [LastLockoutDate], [FailedPasswordAttemptCount], [FailedPasswordAttemptWindowStart], [FailedPasswordAnswerAttemptCount], [FailedPasswordAnswerAttemptWindowStart], [Comment]) VALUES (N'EB04F28B-F63A-4898-9862-9B72AFDBA4F7', N'BE693668-F39A-4511-8E1F-BCFE2A05DE01', N'FEsNLdVN//+DEE847ZFqRyt/en0=', N'1', N'2JDS55/qNll8ISzo3B7HDg==', null, N'jaysoftbd@yahoo.com', N'jaysoftbd@yahoo.com', null, null, N'1', N'0', N'2012-11-08 20:38:45.000', N'2013-02-03 05:29:59.937', N'2012-11-08 20:38:45.000', N'1754-01-01 00:00:00.000', N'0', N'1754-01-01 00:00:00.000', N'0', N'1754-01-01 00:00:00.000', null);
GO
INSERT INTO [dbo].[aspnet_Membership] ([ApplicationId], [UserId], [Password], [PasswordFormat], [PasswordSalt], [MobilePIN], [Email], [LoweredEmail], [PasswordQuestion], [PasswordAnswer], [IsApproved], [IsLockedOut], [CreateDate], [LastLoginDate], [LastPasswordChangedDate], [LastLockoutDate], [FailedPasswordAttemptCount], [FailedPasswordAttemptWindowStart], [FailedPasswordAnswerAttemptCount], [FailedPasswordAnswerAttemptWindowStart], [Comment]) VALUES (N'EB04F28B-F63A-4898-9862-9B72AFDBA4F7', N'B0949672-0D7E-48A3-8910-5AF0BDA05BF6', N'kl1gtOvT23LcLLjjGv8T3ZBe9J4=', N'1', N'WQFl/2j20VFHAHIv/a1dLg==', null, N'manager@csmvertex.com', N'manager@csmvertex.com', null, null, N'1', N'0', N'2013-01-27 06:39:02.000', N'2013-01-27 06:39:03.113', N'2013-01-27 06:39:02.000', N'1754-01-01 00:00:00.000', N'0', N'1754-01-01 00:00:00.000', N'0', N'1754-01-01 00:00:00.000', null);
GO

-- ----------------------------
-- Table structure for [dbo].[aspnet_Paths]
-- ----------------------------
DROP TABLE [dbo].[aspnet_Paths]
GO
CREATE TABLE [dbo].[aspnet_Paths] (
[ApplicationId] uniqueidentifier NOT NULL ,
[PathId] uniqueidentifier NOT NULL DEFAULT (newid()) ,
[Path] nvarchar(256) NOT NULL ,
[LoweredPath] nvarchar(256) NOT NULL 
)


GO

-- ----------------------------
-- Records of aspnet_Paths
-- ----------------------------

-- ----------------------------
-- Table structure for [dbo].[aspnet_PersonalizationAllUsers]
-- ----------------------------
DROP TABLE [dbo].[aspnet_PersonalizationAllUsers]
GO
CREATE TABLE [dbo].[aspnet_PersonalizationAllUsers] (
[PathId] uniqueidentifier NOT NULL ,
[PageSettings] image NOT NULL ,
[LastUpdatedDate] datetime NOT NULL 
)


GO

-- ----------------------------
-- Records of aspnet_PersonalizationAllUsers
-- ----------------------------

-- ----------------------------
-- Table structure for [dbo].[aspnet_PersonalizationPerUser]
-- ----------------------------
DROP TABLE [dbo].[aspnet_PersonalizationPerUser]
GO
CREATE TABLE [dbo].[aspnet_PersonalizationPerUser] (
[Id] uniqueidentifier NOT NULL DEFAULT (newid()) ,
[PathId] uniqueidentifier NULL ,
[UserId] uniqueidentifier NULL ,
[PageSettings] image NOT NULL ,
[LastUpdatedDate] datetime NOT NULL 
)


GO

-- ----------------------------
-- Records of aspnet_PersonalizationPerUser
-- ----------------------------

-- ----------------------------
-- Table structure for [dbo].[aspnet_Profile]
-- ----------------------------
DROP TABLE [dbo].[aspnet_Profile]
GO
CREATE TABLE [dbo].[aspnet_Profile] (
[UserId] uniqueidentifier NOT NULL ,
[PropertyNames] ntext NOT NULL ,
[PropertyValuesString] ntext NOT NULL ,
[PropertyValuesBinary] image NOT NULL ,
[LastUpdatedDate] datetime NOT NULL 
)


GO

-- ----------------------------
-- Records of aspnet_Profile
-- ----------------------------

-- ----------------------------
-- Table structure for [dbo].[aspnet_Roles]
-- ----------------------------
DROP TABLE [dbo].[aspnet_Roles]
GO
CREATE TABLE [dbo].[aspnet_Roles] (
[ApplicationId] uniqueidentifier NOT NULL ,
[RoleId] uniqueidentifier NOT NULL DEFAULT (newid()) ,
[RoleName] nvarchar(256) NOT NULL ,
[LoweredRoleName] nvarchar(256) NOT NULL ,
[Description] nvarchar(256) NULL 
)


GO

-- ----------------------------
-- Records of aspnet_Roles
-- ----------------------------
INSERT INTO [dbo].[aspnet_Roles] ([ApplicationId], [RoleId], [RoleName], [LoweredRoleName], [Description]) VALUES (N'78A33403-26D7-40D8-B36A-1E18E55B530E', N'0A0A1B71-F935-44CA-9094-EB6263128DC8', N'Administrators', N'administrators', null);
GO
INSERT INTO [dbo].[aspnet_Roles] ([ApplicationId], [RoleId], [RoleName], [LoweredRoleName], [Description]) VALUES (N'78A33403-26D7-40D8-B36A-1E18E55B530E', N'9C224A79-1D4C-4FC5-986B-8449071A68FA', N'Friends', N'friends', null);
GO
INSERT INTO [dbo].[aspnet_Roles] ([ApplicationId], [RoleId], [RoleName], [LoweredRoleName], [Description]) VALUES (N'EB04F28B-F63A-4898-9862-9B72AFDBA4F7', N'FC6E56CA-A9E0-4F52-B3FF-54A2545C6E26', N'Accounts', N'accounts', null);
GO
INSERT INTO [dbo].[aspnet_Roles] ([ApplicationId], [RoleId], [RoleName], [LoweredRoleName], [Description]) VALUES (N'EB04F28B-F63A-4898-9862-9B72AFDBA4F7', N'0E8B8617-8DF4-4C8B-BA7F-B60BF050189B', N'Administrator', N'administrator', null);
GO
INSERT INTO [dbo].[aspnet_Roles] ([ApplicationId], [RoleId], [RoleName], [LoweredRoleName], [Description]) VALUES (N'EB04F28B-F63A-4898-9862-9B72AFDBA4F7', N'4D6BAE26-AD49-4D9B-BDF1-59F08CC57FCF', N'HR', N'hr', null);
GO
INSERT INTO [dbo].[aspnet_Roles] ([ApplicationId], [RoleId], [RoleName], [LoweredRoleName], [Description]) VALUES (N'EB04F28B-F63A-4898-9862-9B72AFDBA4F7', N'17F712B7-633C-40BB-91E1-249D090DB9B9', N'Inventory', N'inventory', null);
GO
INSERT INTO [dbo].[aspnet_Roles] ([ApplicationId], [RoleId], [RoleName], [LoweredRoleName], [Description]) VALUES (N'EB04F28B-F63A-4898-9862-9B72AFDBA4F7', N'4A2C5852-C03F-4F4A-B380-380100A6A2DE', N'Manager', N'manager', null);
GO
INSERT INTO [dbo].[aspnet_Roles] ([ApplicationId], [RoleId], [RoleName], [LoweredRoleName], [Description]) VALUES (N'EB04F28B-F63A-4898-9862-9B72AFDBA4F7', N'18FA796A-E0D1-460A-82D4-5A04DD05F210', N'Purchase', N'purchase', null);
GO
INSERT INTO [dbo].[aspnet_Roles] ([ApplicationId], [RoleId], [RoleName], [LoweredRoleName], [Description]) VALUES (N'EB04F28B-F63A-4898-9862-9B72AFDBA4F7', N'8CEE9EB1-BDC7-4103-9D65-EDE243B1D632', N'Sales', N'sales', null);
GO
INSERT INTO [dbo].[aspnet_Roles] ([ApplicationId], [RoleId], [RoleName], [LoweredRoleName], [Description]) VALUES (N'EB04F28B-F63A-4898-9862-9B72AFDBA4F7', N'EF06B510-4D21-4FEC-95FB-E899DCCA277F', N'Site Administrator', N'site administrator', null);
GO
INSERT INTO [dbo].[aspnet_Roles] ([ApplicationId], [RoleId], [RoleName], [LoweredRoleName], [Description]) VALUES (N'EB04F28B-F63A-4898-9862-9B72AFDBA4F7', N'F8786C08-D225-4477-ACAF-79F3F9C3A950', N'Super Administrator', N'super administrator', null);
GO

-- ----------------------------
-- Table structure for [dbo].[aspnet_SchemaVersions]
-- ----------------------------
DROP TABLE [dbo].[aspnet_SchemaVersions]
GO
CREATE TABLE [dbo].[aspnet_SchemaVersions] (
[Feature] nvarchar(128) NOT NULL ,
[CompatibleSchemaVersion] nvarchar(128) NOT NULL ,
[IsCurrentVersion] bit NOT NULL 
)


GO

-- ----------------------------
-- Records of aspnet_SchemaVersions
-- ----------------------------
INSERT INTO [dbo].[aspnet_SchemaVersions] ([Feature], [CompatibleSchemaVersion], [IsCurrentVersion]) VALUES (N'common', N'1', N'1');
GO
INSERT INTO [dbo].[aspnet_SchemaVersions] ([Feature], [CompatibleSchemaVersion], [IsCurrentVersion]) VALUES (N'health monitoring', N'1', N'1');
GO
INSERT INTO [dbo].[aspnet_SchemaVersions] ([Feature], [CompatibleSchemaVersion], [IsCurrentVersion]) VALUES (N'membership', N'1', N'1');
GO
INSERT INTO [dbo].[aspnet_SchemaVersions] ([Feature], [CompatibleSchemaVersion], [IsCurrentVersion]) VALUES (N'personalization', N'1', N'1');
GO
INSERT INTO [dbo].[aspnet_SchemaVersions] ([Feature], [CompatibleSchemaVersion], [IsCurrentVersion]) VALUES (N'profile', N'1', N'1');
GO
INSERT INTO [dbo].[aspnet_SchemaVersions] ([Feature], [CompatibleSchemaVersion], [IsCurrentVersion]) VALUES (N'role manager', N'1', N'1');
GO

-- ----------------------------
-- Table structure for [dbo].[aspnet_Users]
-- ----------------------------
DROP TABLE [dbo].[aspnet_Users]
GO
CREATE TABLE [dbo].[aspnet_Users] (
[ApplicationId] uniqueidentifier NOT NULL ,
[UserId] uniqueidentifier NOT NULL DEFAULT (newid()) ,
[UserName] nvarchar(256) NOT NULL ,
[LoweredUserName] nvarchar(256) NOT NULL ,
[MobileAlias] nvarchar(16) NULL DEFAULT NULL ,
[IsAnonymous] bit NOT NULL DEFAULT ((0)) ,
[LastActivityDate] datetime NOT NULL 
)


GO

-- ----------------------------
-- Records of aspnet_Users
-- ----------------------------
INSERT INTO [dbo].[aspnet_Users] ([ApplicationId], [UserId], [UserName], [LoweredUserName], [MobileAlias], [IsAnonymous], [LastActivityDate]) VALUES (N'EB04F28B-F63A-4898-9862-9B72AFDBA4F7', N'CA2E9B7C-6E06-431C-8F60-E0304446B88F', N'Inventory', N'inventory', null, N'0', N'2013-01-27 06:40:07.180');
GO
INSERT INTO [dbo].[aspnet_Users] ([ApplicationId], [UserId], [UserName], [LoweredUserName], [MobileAlias], [IsAnonymous], [LastActivityDate]) VALUES (N'EB04F28B-F63A-4898-9862-9B72AFDBA4F7', N'B0949672-0D7E-48A3-8910-5AF0BDA05BF6', N'Manager', N'manager', null, N'0', N'2013-01-27 06:39:03.113');
GO
INSERT INTO [dbo].[aspnet_Users] ([ApplicationId], [UserId], [UserName], [LoweredUserName], [MobileAlias], [IsAnonymous], [LastActivityDate]) VALUES (N'EB04F28B-F63A-4898-9862-9B72AFDBA4F7', N'BE693668-F39A-4511-8E1F-BCFE2A05DE01', N'Site Admin', N'site admin', null, N'0', N'2013-02-03 05:29:59.937');
GO

-- ----------------------------
-- Table structure for [dbo].[aspnet_UsersInRoles]
-- ----------------------------
DROP TABLE [dbo].[aspnet_UsersInRoles]
GO
CREATE TABLE [dbo].[aspnet_UsersInRoles] (
[UserId] uniqueidentifier NOT NULL ,
[RoleId] uniqueidentifier NOT NULL 
)


GO

-- ----------------------------
-- Records of aspnet_UsersInRoles
-- ----------------------------
INSERT INTO [dbo].[aspnet_UsersInRoles] ([UserId], [RoleId]) VALUES (N'CA2E9B7C-6E06-431C-8F60-E0304446B88F', N'17F712B7-633C-40BB-91E1-249D090DB9B9');
GO
INSERT INTO [dbo].[aspnet_UsersInRoles] ([UserId], [RoleId]) VALUES (N'B0949672-0D7E-48A3-8910-5AF0BDA05BF6', N'4A2C5852-C03F-4F4A-B380-380100A6A2DE');
GO
INSERT INTO [dbo].[aspnet_UsersInRoles] ([UserId], [RoleId]) VALUES (N'BE693668-F39A-4511-8E1F-BCFE2A05DE01', N'EF06B510-4D21-4FEC-95FB-E899DCCA277F');
GO

-- ----------------------------
-- Table structure for [dbo].[aspnet_WebEvent_Events]
-- ----------------------------
DROP TABLE [dbo].[aspnet_WebEvent_Events]
GO
CREATE TABLE [dbo].[aspnet_WebEvent_Events] (
[EventId] char(32) NOT NULL ,
[EventTimeUtc] datetime NOT NULL ,
[EventTime] datetime NOT NULL ,
[EventType] nvarchar(256) NOT NULL ,
[EventSequence] decimal(19) NOT NULL ,
[EventOccurrence] decimal(19) NOT NULL ,
[EventCode] int NOT NULL ,
[EventDetailCode] int NOT NULL ,
[Message] nvarchar(1024) NULL ,
[ApplicationPath] nvarchar(256) NULL ,
[ApplicationVirtualPath] nvarchar(256) NULL ,
[MachineName] nvarchar(256) NOT NULL ,
[RequestUrl] nvarchar(1024) NULL ,
[ExceptionType] nvarchar(256) NULL ,
[Details] ntext NULL 
)


GO

-- ----------------------------
-- Records of aspnet_WebEvent_Events
-- ----------------------------

-- ----------------------------
-- Table structure for [dbo].[HRMDepartment]
-- ----------------------------
DROP TABLE [dbo].[HRMDepartment]
GO
CREATE TABLE [dbo].[HRMDepartment] (
[DepartmentID] int NOT NULL IDENTITY(1,1) ,
[DepartmentCode] nvarchar(8) NULL ,
[DepartmentName] nvarchar(64) NULL ,
[Description] nvarchar(MAX) NULL ,
[CreatedBy] uniqueidentifier NULL ,
[CreatedDate] datetime NULL ,
[ModifiedBy] uniqueidentifier NULL ,
[ModifiedDate] datetime NULL 
)


GO

-- ----------------------------
-- Records of HRMDepartment
-- ----------------------------
SET IDENTITY_INSERT [dbo].[HRMDepartment] ON
GO
SET IDENTITY_INSERT [dbo].[HRMDepartment] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[HRMDesignation]
-- ----------------------------
DROP TABLE [dbo].[HRMDesignation]
GO
CREATE TABLE [dbo].[HRMDesignation] (
[DesignationID] int NOT NULL IDENTITY(1,1) ,
[DesignationCode] nvarchar(8) NULL ,
[Designationame] nvarchar(64) NULL ,
[GradeID] int NULL ,
[ReportTo] int NULL DEFAULT ((0)) ,
[Description] nvarchar(MAX) NULL ,
[CreatedBy] uniqueidentifier NULL ,
[CreatedDate] datetime NULL ,
[ModifiedBy] uniqueidentifier NULL ,
[ModifiedDate] datetime NULL 
)


GO

-- ----------------------------
-- Records of HRMDesignation
-- ----------------------------
SET IDENTITY_INSERT [dbo].[HRMDesignation] ON
GO
SET IDENTITY_INSERT [dbo].[HRMDesignation] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[HRMEmployee]
-- ----------------------------
DROP TABLE [dbo].[HRMEmployee]
GO
CREATE TABLE [dbo].[HRMEmployee] (
[EmployeeID] int NOT NULL IDENTITY(1,1) ,
[EmployeeCode] nvarchar(32) NOT NULL ,
[EmployeeName] nvarchar(128) NOT NULL ,
[EmployeeCard] nvarchar(32) NULL ,
[EmployeeBarcode] nvarchar(16) NULL ,
[EmployeeNID] nvarchar(24) NULL ,
[EmployeeProx1] nvarchar(24) NULL ,
[EmployeeProx2] nvarchar(24) NULL ,
[FatherName] nvarchar(128) NULL ,
[MotherName] nvarchar(128) NULL ,
[ContactName] nvarchar(128) NULL ,
[ContactNo] nvarchar(64) NULL ,
[Gender] nvarchar(16) NULL ,
[Religion] nvarchar(48) NULL ,
[BloodGroup] nvarchar(8) NULL ,
[DOB] datetime NULL ,
[IsMarried] bit NULL ,
[SpouseName] nvarchar(128) NULL ,
[HasChildren] bit NULL ,
[ChildrenNo] smallint NULL ,
[Remarks] nvarchar(MAX) NULL ,
[EmployeePhoto] image NULL ,
[IsActive] bit NULL ,
[UserID] uniqueidentifier NULL ,
[CreatedBy] uniqueidentifier NULL ,
[CreatedDate] datetime NULL ,
[ModifiedBy] uniqueidentifier NULL ,
[ModifiedDate] datetime NULL 
)


GO

-- ----------------------------
-- Records of HRMEmployee
-- ----------------------------
SET IDENTITY_INSERT [dbo].[HRMEmployee] ON
GO
SET IDENTITY_INSERT [dbo].[HRMEmployee] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[HRMEmployeeAddress]
-- ----------------------------
DROP TABLE [dbo].[HRMEmployeeAddress]
GO
CREATE TABLE [dbo].[HRMEmployeeAddress] (
[EmployeeID] int NOT NULL ,
[PERAddress] nvarchar(MAX) NULL ,
[PERAreaPSID] int NULL ,
[PERDistrictID] int NULL ,
[PERDivisionID] int NULL ,
[PERCountryID] int NULL ,
[PERZIP] int NULL ,
[PERTel] nvarchar(64) NULL ,
[PERCell] nvarchar(64) NULL ,
[PEREmail] nvarchar(128) NULL ,
[PREAddress] nvarchar(MAX) NULL ,
[PREAreaPSID] int NULL ,
[PREDistrictID] int NULL ,
[PREDivisionID] int NULL ,
[PRECountryID] int NULL ,
[PREZIP] int NULL ,
[PRETel] nvarchar(64) NULL ,
[PRECell] nvarchar(64) NULL ,
[PREEmail] nvarchar(128) NULL ,
[CreatedBy] uniqueidentifier NULL ,
[CreatedDate] datetime NULL ,
[ModifiedBy] uniqueidentifier NULL ,
[ModifiedDate] datetime NULL 
)


GO

-- ----------------------------
-- Records of HRMEmployeeAddress
-- ----------------------------

-- ----------------------------
-- Table structure for [dbo].[HRMEmployeeAttendance]
-- ----------------------------
DROP TABLE [dbo].[HRMEmployeeAttendance]
GO
CREATE TABLE [dbo].[HRMEmployeeAttendance] (
[EmployeeID] int NOT NULL ,
[AttDate] datetime NULL ,
[TimeIn] datetime NULL ,
[TimeOut] datetime NULL ,
[LateTime] int NULL DEFAULT ((0)) ,
[IsHoliday] bit NULL ,
[IsAbsent] bit NULL ,
[IsLate] bit NULL ,
[IsLeave] bit NULL ,
[AttStatus] nvarchar(2) NULL ,
[CreatedBy] uniqueidentifier NULL ,
[CreatedDate] datetime NULL ,
[ModifiedBy] uniqueidentifier NULL ,
[ModifiedDate] datetime NULL 
)


GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'HRMEmployeeAttendance', 
'COLUMN', N'AttStatus')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'Present - PR, Late Present - LP, Absent - AB, Leave - LV'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'HRMEmployeeAttendance'
, @level2type = 'COLUMN', @level2name = N'AttStatus'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'Present - PR, Late Present - LP, Absent - AB, Leave - LV'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'HRMEmployeeAttendance'
, @level2type = 'COLUMN', @level2name = N'AttStatus'
GO

-- ----------------------------
-- Records of HRMEmployeeAttendance
-- ----------------------------

-- ----------------------------
-- Table structure for [dbo].[HRMEmployeeAward]
-- ----------------------------
DROP TABLE [dbo].[HRMEmployeeAward]
GO
CREATE TABLE [dbo].[HRMEmployeeAward] (
[AwardID] bigint NOT NULL IDENTITY(1,1) ,
[EmployeeID] bigint NOT NULL ,
[AwardType] nvarchar(48) NULL ,
[Title] nvarchar(256) NULL ,
[AwardDate] datetime NULL ,
[Achievement] nvarchar(128) NULL ,
[Description] nvarchar(MAX) NULL ,
[CreatedBy] uniqueidentifier NULL ,
[CreatedDate] datetime NULL ,
[ModifiedBy] uniqueidentifier NULL ,
[ModifiedDate] datetime NULL 
)


GO

-- ----------------------------
-- Records of HRMEmployeeAward
-- ----------------------------
SET IDENTITY_INSERT [dbo].[HRMEmployeeAward] ON
GO
SET IDENTITY_INSERT [dbo].[HRMEmployeeAward] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[HRMEmployeeChildren]
-- ----------------------------
DROP TABLE [dbo].[HRMEmployeeChildren]
GO
CREATE TABLE [dbo].[HRMEmployeeChildren] (
[ChildrenID] bigint NOT NULL IDENTITY(1,1) ,
[EmployeeID] int NOT NULL ,
[ChildrenName] nvarchar(128) NOT NULL ,
[DOB] datetime NULL ,
[Gender] nvarchar(16) NULL ,
[BloodGroup] nvarchar(4) NULL ,
[IsInSchool] bit NULL ,
[CreatedBy] uniqueidentifier NULL ,
[CreatedDate] datetime NULL ,
[ModifiedBy] uniqueidentifier NULL ,
[ModifiedDate] datetime NULL 
)


GO

-- ----------------------------
-- Records of HRMEmployeeChildren
-- ----------------------------
SET IDENTITY_INSERT [dbo].[HRMEmployeeChildren] ON
GO
SET IDENTITY_INSERT [dbo].[HRMEmployeeChildren] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[HRMEmployeeEducation]
-- ----------------------------
DROP TABLE [dbo].[HRMEmployeeEducation]
GO
CREATE TABLE [dbo].[HRMEmployeeEducation] (
[EducationID] bigint NOT NULL IDENTITY(1,1) ,
[EmployeeID] bigint NOT NULL ,
[Degree] nvarchar(128) NULL ,
[GroupSubject] nvarchar(128) NULL ,
[BoardInstitution] nvarchar(128) NULL ,
[Year] int NULL DEFAULT ((0)) ,
[Result] nvarchar(50) NULL ,
[CreatedBy] uniqueidentifier NULL ,
[CreatedDate] datetime NULL ,
[ModifiedBy] uniqueidentifier NULL ,
[ModifiedDate] datetime NULL 
)


GO

-- ----------------------------
-- Records of HRMEmployeeEducation
-- ----------------------------
SET IDENTITY_INSERT [dbo].[HRMEmployeeEducation] ON
GO
SET IDENTITY_INSERT [dbo].[HRMEmployeeEducation] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[HRMEmployeeLeave]
-- ----------------------------
DROP TABLE [dbo].[HRMEmployeeLeave]
GO
CREATE TABLE [dbo].[HRMEmployeeLeave] (
[EmployeeLeaveID] bigint NOT NULL IDENTITY(1,1) ,
[EmployeeID] int NULL ,
[LeaveID] int NULL ,
[LeaveName] nvarchar(64) NULL ,
[Description] nvarchar(MAX) NULL ,
[DateApply] datetime NULL ,
[DateFrom] datetime NULL ,
[DateTo] datetime NULL ,
[TotalDays] int NULL DEFAULT ((0)) ,
[DateAuth] datetime NULL ,
[AuthDays] int NULL DEFAULT ((0)) ,
[IsAuthorize] bit NULL ,
[CreatedBy] uniqueidentifier NULL ,
[CreatedDate] datetime NULL ,
[ModifiedBy] uniqueidentifier NULL ,
[ModifiedDate] datetime NULL 
)


GO

-- ----------------------------
-- Records of HRMEmployeeLeave
-- ----------------------------
SET IDENTITY_INSERT [dbo].[HRMEmployeeLeave] ON
GO
SET IDENTITY_INSERT [dbo].[HRMEmployeeLeave] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[HRMEmployeeMembership]
-- ----------------------------
DROP TABLE [dbo].[HRMEmployeeMembership]
GO
CREATE TABLE [dbo].[HRMEmployeeMembership] (
[MembershipID] int NOT NULL IDENTITY(1,1) ,
[EmployeeID] bigint NOT NULL ,
[MembershipType] nvarchar(48) NULL ,
[MembershipLevel] nvarchar(256) NULL ,
[Organization] nvarchar(128) NULL ,
[Address] nvarchar(MAX) NULL ,
[AreaPSID] int NULL ,
[DistrictID] int NULL ,
[DivisionID] int NULL ,
[CountryID] int NULL ,
[DateFrom] datetime NULL ,
[Achievement] nvarchar(128) NULL ,
[CreatedBy] uniqueidentifier NULL ,
[CreatedDate] datetime NULL ,
[ModifiedBy] uniqueidentifier NULL ,
[ModifiedDate] datetime NULL 
)


GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'HRMEmployeeMembership', 
'COLUMN', N'MembershipType')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'Local, Abroad'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'HRMEmployeeMembership'
, @level2type = 'COLUMN', @level2name = N'MembershipType'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'Local, Abroad'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'HRMEmployeeMembership'
, @level2type = 'COLUMN', @level2name = N'MembershipType'
GO

-- ----------------------------
-- Records of HRMEmployeeMembership
-- ----------------------------
SET IDENTITY_INSERT [dbo].[HRMEmployeeMembership] ON
GO
SET IDENTITY_INSERT [dbo].[HRMEmployeeMembership] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[HRMEmployeeProfessional]
-- ----------------------------
DROP TABLE [dbo].[HRMEmployeeProfessional]
GO
CREATE TABLE [dbo].[HRMEmployeeProfessional] (
[ProfessionalID] int NOT NULL IDENTITY(1,1) ,
[EmployeeID] int NOT NULL DEFAULT ((0)) ,
[Category] nvarchar(48) NULL DEFAULT ((0)) ,
[Type] nvarchar(48) NULL DEFAULT ((0)) ,
[DesignationID] int NULL DEFAULT ((0)) ,
[DepartmentID] int NULL DEFAULT ((0)) ,
[ShiftID] int NULL DEFAULT ((0)) ,
[DOJ] datetime NULL ,
[SalaryRuleID] int NULL DEFAULT ((0)) ,
[GrossSalary] float(53) NULL DEFAULT ((0)) ,
[GrossType] nvarchar(50) NULL ,
[BasicSalary] float(53) NULL DEFAULT ((0)) ,
[BasicType] nvarchar(50) NULL ,
[HouseRent] float(53) NULL DEFAULT ((0)) ,
[HouseType] nvarchar(50) NULL ,
[MedicalAllowance] float(53) NULL DEFAULT ((0)) ,
[MedicalType] nvarchar(50) NULL ,
[Duty] nvarchar(MAX) NULL ,
[Responsibility] nvarchar(MAX) NULL ,
[CreatedBy] uniqueidentifier NULL ,
[CreatedDate] datetime NULL ,
[ModifiedBy] uniqueidentifier NULL ,
[ModifiedDate] datetime NULL 
)


GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'HRMEmployeeProfessional', 
'COLUMN', N'Category')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'Fulltime, Parttime'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'HRMEmployeeProfessional'
, @level2type = 'COLUMN', @level2name = N'Category'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'Fulltime, Parttime'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'HRMEmployeeProfessional'
, @level2type = 'COLUMN', @level2name = N'Category'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'HRMEmployeeProfessional', 
'COLUMN', N'Type')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'Teacher, Other'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'HRMEmployeeProfessional'
, @level2type = 'COLUMN', @level2name = N'Type'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'Teacher, Other'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'HRMEmployeeProfessional'
, @level2type = 'COLUMN', @level2name = N'Type'
GO

-- ----------------------------
-- Records of HRMEmployeeProfessional
-- ----------------------------
SET IDENTITY_INSERT [dbo].[HRMEmployeeProfessional] ON
GO
SET IDENTITY_INSERT [dbo].[HRMEmployeeProfessional] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[HRMEmployeePromotion]
-- ----------------------------
DROP TABLE [dbo].[HRMEmployeePromotion]
GO
CREATE TABLE [dbo].[HRMEmployeePromotion] (
[PromotionID] bigint NOT NULL IDENTITY(1,1) ,
[EmployeeID] bigint NOT NULL ,
[Category] nvarchar(48) NULL DEFAULT ((0)) ,
[Type] nvarchar(48) NULL DEFAULT ((0)) ,
[DesignationID] int NULL DEFAULT ((0)) ,
[DepartmentID] int NULL DEFAULT ((0)) ,
[ShiftID] int NULL DEFAULT ((0)) ,
[DOJ] datetime NULL ,
[SalaryRuleID] int NULL DEFAULT ((0)) ,
[GrossSalary] float(53) NULL DEFAULT ((0)) ,
[GrossType] nvarchar(50) NULL ,
[BasicSalary] float(53) NULL DEFAULT ((0)) ,
[BasicType] nvarchar(50) NULL ,
[HouseRent] float(53) NULL DEFAULT ((0)) ,
[HouseType] nvarchar(50) NULL ,
[MedicalAllowance] float(53) NULL DEFAULT ((0)) ,
[MedicalType] nvarchar(50) NULL ,
[IsPromotion] bit NULL ,
[Duty] nvarchar(MAX) NULL ,
[Responsibility] nvarchar(MAX) NULL ,
[CreatedBy] uniqueidentifier NULL ,
[CreatedDate] datetime NULL ,
[ModifiedBy] uniqueidentifier NULL ,
[ModifiedDate] datetime NULL 
)


GO

-- ----------------------------
-- Records of HRMEmployeePromotion
-- ----------------------------
SET IDENTITY_INSERT [dbo].[HRMEmployeePromotion] ON
GO
SET IDENTITY_INSERT [dbo].[HRMEmployeePromotion] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[HRMEmployeePublication]
-- ----------------------------
DROP TABLE [dbo].[HRMEmployeePublication]
GO
CREATE TABLE [dbo].[HRMEmployeePublication] (
[PublicationID] bigint NOT NULL IDENTITY(1,1) ,
[EmployeeID] bigint NOT NULL ,
[PublicationType] nvarchar(48) NULL ,
[Title] nvarchar(256) NULL ,
[PublishDate] datetime NULL ,
[Achievement] nvarchar(128) NULL ,
[CreatedBy] uniqueidentifier NULL ,
[CreatedDate] datetime NULL ,
[ModifiedBy] uniqueidentifier NULL ,
[ModifiedDate] datetime NULL 
)


GO

-- ----------------------------
-- Records of HRMEmployeePublication
-- ----------------------------
SET IDENTITY_INSERT [dbo].[HRMEmployeePublication] ON
GO
SET IDENTITY_INSERT [dbo].[HRMEmployeePublication] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[HRMEmployeePunishment]
-- ----------------------------
DROP TABLE [dbo].[HRMEmployeePunishment]
GO
CREATE TABLE [dbo].[HRMEmployeePunishment] (
[PunishmentID] bigint NOT NULL IDENTITY(1,1) ,
[EmployeeID] bigint NOT NULL ,
[PunishmentType] nvarchar(48) NULL ,
[Title] nvarchar(256) NULL ,
[PunishmentDate] datetime NULL ,
[Cause] nvarchar(128) NULL ,
[Description] nvarchar(MAX) NULL ,
[CreatedBy] uniqueidentifier NULL ,
[CreatedDate] datetime NULL ,
[ModifiedBy] uniqueidentifier NULL ,
[ModifiedDate] datetime NULL 
)


GO

-- ----------------------------
-- Records of HRMEmployeePunishment
-- ----------------------------
SET IDENTITY_INSERT [dbo].[HRMEmployeePunishment] ON
GO
SET IDENTITY_INSERT [dbo].[HRMEmployeePunishment] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[HRMEmployeeTraining]
-- ----------------------------
DROP TABLE [dbo].[HRMEmployeeTraining]
GO
CREATE TABLE [dbo].[HRMEmployeeTraining] (
[TrainingID] bigint NOT NULL IDENTITY(1,1) ,
[EmployeeID] bigint NOT NULL ,
[TrainingType] nvarchar(48) NULL ,
[Title] nvarchar(256) NULL ,
[CountryID] int NULL ,
[DateFrom] datetime NULL ,
[DateTo] datetime NULL ,
[TotalDays] int NULL DEFAULT ((0)) ,
[Achievement] nvarchar(128) NULL ,
[CreatedBy] uniqueidentifier NULL ,
[CreatedDate] datetime NULL ,
[ModifiedBy] uniqueidentifier NULL ,
[ModifiedDate] datetime NULL 
)


GO

-- ----------------------------
-- Records of HRMEmployeeTraining
-- ----------------------------
SET IDENTITY_INSERT [dbo].[HRMEmployeeTraining] ON
GO
SET IDENTITY_INSERT [dbo].[HRMEmployeeTraining] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[HRMEmployeeVisit]
-- ----------------------------
DROP TABLE [dbo].[HRMEmployeeVisit]
GO
CREATE TABLE [dbo].[HRMEmployeeVisit] (
[VisitID] int NOT NULL IDENTITY(1,1) ,
[EmployeeID] bigint NOT NULL ,
[VisitType] nvarchar(48) NULL ,
[Purpose] nvarchar(256) NULL ,
[Organization] nvarchar(128) NULL ,
[Address] nvarchar(MAX) NULL ,
[AreaPSID] int NULL ,
[DistrictID] int NULL ,
[DivisionID] int NULL ,
[CountryID] int NULL ,
[DateFrom] datetime NULL ,
[DateTo] datetime NULL ,
[TotalDays] int NULL DEFAULT ((0)) ,
[Achievement] nvarchar(128) NULL ,
[CreatedBy] uniqueidentifier NULL ,
[CreatedDate] datetime NULL ,
[ModifiedBy] uniqueidentifier NULL ,
[ModifiedDate] datetime NULL 
)


GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'HRMEmployeeVisit', 
'COLUMN', N'VisitType')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'Local, Abroad'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'HRMEmployeeVisit'
, @level2type = 'COLUMN', @level2name = N'VisitType'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'Local, Abroad'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'HRMEmployeeVisit'
, @level2type = 'COLUMN', @level2name = N'VisitType'
GO

-- ----------------------------
-- Records of HRMEmployeeVisit
-- ----------------------------
SET IDENTITY_INSERT [dbo].[HRMEmployeeVisit] ON
GO
SET IDENTITY_INSERT [dbo].[HRMEmployeeVisit] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[HRMGrade]
-- ----------------------------
DROP TABLE [dbo].[HRMGrade]
GO
CREATE TABLE [dbo].[HRMGrade] (
[GradeID] int NOT NULL IDENTITY(1,1) ,
[GradeCode] nvarchar(8) NULL ,
[GradeName] nvarchar(64) NULL ,
[StartingGross] float(53) NULL DEFAULT ((0)) ,
[ClosingGross] float(53) NULL DEFAULT ((0)) ,
[WorkingBasic] float(53) NULL DEFAULT ((0)) ,
[NoWorkingBasic] float(53) NULL DEFAULT ((0)) ,
[Description] nvarchar(MAX) NULL 
)


GO

-- ----------------------------
-- Records of HRMGrade
-- ----------------------------
SET IDENTITY_INSERT [dbo].[HRMGrade] ON
GO
SET IDENTITY_INSERT [dbo].[HRMGrade] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[HRMHoliday]
-- ----------------------------
DROP TABLE [dbo].[HRMHoliday]
GO
CREATE TABLE [dbo].[HRMHoliday] (
[HolidayID] bigint NOT NULL IDENTITY(1,1) ,
[AttDate] datetime NULL ,
[HolidayType] nvarchar(64) NULL ,
[HolidayName] nvarchar(128) NULL ,
[CreatedBy] uniqueidentifier NULL ,
[CreatedDate] datetime NULL ,
[ModifiedBy] uniqueidentifier NULL ,
[ModifiedDate] datetime NULL 
)


GO

-- ----------------------------
-- Records of HRMHoliday
-- ----------------------------
SET IDENTITY_INSERT [dbo].[HRMHoliday] ON
GO
SET IDENTITY_INSERT [dbo].[HRMHoliday] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[HRMLeave]
-- ----------------------------
DROP TABLE [dbo].[HRMLeave]
GO
CREATE TABLE [dbo].[HRMLeave] (
[LeaveID] bigint NOT NULL IDENTITY(1,1) ,
[LeaveCode] nvarchar(12) NULL ,
[LeaveName] nvarchar(48) NULL ,
[DaysMonth] smallint NULL DEFAULT ((0)) ,
[DaysYear] smallint NULL DEFAULT ((0)) ,
[LeaveType] nvarchar(32) NULL ,
[LeavePara] nvarchar(32) NULL ,
[LeaveSalary] nvarchar(32) NULL ,
[CreatedBy] uniqueidentifier NULL ,
[CreatedDate] datetime NULL ,
[ModifiedBy] uniqueidentifier NULL ,
[ModifiedDate] datetime NULL 
)


GO

-- ----------------------------
-- Records of HRMLeave
-- ----------------------------
SET IDENTITY_INSERT [dbo].[HRMLeave] ON
GO
SET IDENTITY_INSERT [dbo].[HRMLeave] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[HRMLeavePolicy]
-- ----------------------------
DROP TABLE [dbo].[HRMLeavePolicy]
GO
CREATE TABLE [dbo].[HRMLeavePolicy] (
[LeaveID] int NOT NULL ,
[PolicyID] int NULL ,
[PolicyName] nvarchar(128) NULL ,
[CreatedBy] uniqueidentifier NULL ,
[CreatedDate] datetime NULL ,
[ModifiedBy] uniqueidentifier NULL ,
[ModifiedDate] datetime NULL 
)


GO

-- ----------------------------
-- Records of HRMLeavePolicy
-- ----------------------------

-- ----------------------------
-- Table structure for [dbo].[HRMShift]
-- ----------------------------
DROP TABLE [dbo].[HRMShift]
GO
CREATE TABLE [dbo].[HRMShift] (
[ShiftID] int NOT NULL IDENTITY(1,1) ,
[ShiftCode] nvarchar(32) NULL ,
[ShiftName] nvarchar(128) NULL ,
[TimeStart] datetime NULL ,
[TimeEnd] datetime NULL ,
[TotalTime] float(53) NULL DEFAULT ((0)) ,
[MaxLate] int NULL DEFAULT ((0)) ,
[IsBreak] bit NULL ,
[BreakStart] datetime NULL ,
[BreakEnd] datetime NULL ,
[TotalBreak] float(53) NULL DEFAULT ((0)) ,
[Description] nvarchar(MAX) NULL ,
[CreatedBy] uniqueidentifier NULL ,
[CreatedDate] datetime NULL ,
[ModifiedBy] uniqueidentifier NULL ,
[ModifiedDate] datetime NULL 
)


GO

-- ----------------------------
-- Records of HRMShift
-- ----------------------------
SET IDENTITY_INSERT [dbo].[HRMShift] ON
GO
SET IDENTITY_INSERT [dbo].[HRMShift] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[INVBagFair]
-- ----------------------------
DROP TABLE [dbo].[INVBagFair]
GO
CREATE TABLE [dbo].[INVBagFair] (
[FairID] int NOT NULL IDENTITY(1,1) ,
[BagWeight] float(53) NULL ,
[BagUOM] nvarchar(32) NULL ,
[BagFair] float(53) NULL ,
[CreatedBy] uniqueidentifier NULL ,
[CreatedDate] datetime NULL ,
[ModifiedBy] uniqueidentifier NULL ,
[ModifiedDate] datetime NULL 
)


GO
DBCC CHECKIDENT(N'[dbo].[INVBagFair]', RESEED, 2)
GO

-- ----------------------------
-- Records of INVBagFair
-- ----------------------------
SET IDENTITY_INSERT [dbo].[INVBagFair] ON
GO
INSERT INTO [dbo].[INVBagFair] ([FairID], [BagWeight], [BagUOM], [BagFair], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'1', N'85', N'KG', N'320', null, null, null, null);
GO
INSERT INTO [dbo].[INVBagFair] ([FairID], [BagWeight], [BagUOM], [BagFair], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'2', N'60', N'KG', N'250', null, null, null, null);
GO
SET IDENTITY_INSERT [dbo].[INVBagFair] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[INVInventoryAdjustment]
-- ----------------------------
DROP TABLE [dbo].[INVInventoryAdjustment]
GO
CREATE TABLE [dbo].[INVInventoryAdjustment] (
[AdjustmentID] bigint NOT NULL IDENTITY(1,1) ,
[AdjustmentNo] varchar(10) NULL ,
[AdjustmentDate] datetime NOT NULL ,
[ItemID] bigint NULL ,
[AdjustmentType] tinyint NULL ,
[AdjustmentQty] int NOT NULL ,
[AdjustmentUOM] varchar(10) NOT NULL ,
[AdjustmentRate] float(53) NULL ,
[AdjustmentCurrency] varchar(50) NULL ,
[ItemRate] float(53) NULL ,
[AdjustmentTotal] float(53) NULL ,
[AdjustmentQtyType] tinyint NULL ,
[AdjustmentQtyLessDamage] tinyint NULL ,
[Remarks] varchar(500) NULL 
)


GO

-- ----------------------------
-- Records of INVInventoryAdjustment
-- ----------------------------
SET IDENTITY_INSERT [dbo].[INVInventoryAdjustment] ON
GO
SET IDENTITY_INSERT [dbo].[INVInventoryAdjustment] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[INVInventoryLedger]
-- ----------------------------
DROP TABLE [dbo].[INVInventoryLedger]
GO
CREATE TABLE [dbo].[INVInventoryLedger] (
[LedgerID] bigint NOT NULL IDENTITY(1,1) ,
[LedgerNo] varchar(25) NULL ,
[LedgerDate] datetime NULL ,
[LedgerRefID] bigint NULL ,
[LedgerRefNo] varchar(25) NULL ,
[ItemID] bigint NOT NULL ,
[ItemUOM] varchar(20) NOT NULL ,
[LedgerType] nchar(25) NULL ,
[OPQty] float(53) NULL ,
[INQty] float(53) NULL ,
[TransferINQty] float(53) NULL ,
[PurchaseINQty] float(53) NULL ,
[ReturnINQty] float(53) NULL ,
[OthersINQty] float(53) NULL ,
[OUTQty] float(53) NULL ,
[TransferOUTQty] float(53) NULL ,
[IssueOUTQty] float(53) NULL ,
[ReturnOUTQty] float(53) NULL ,
[OthersOUTQty] float(53) NULL ,
[BalanceQty] float(53) NULL ,
[UP] float(53) NULL ,
[MRP] float(53) NULL ,
[Currency] varchar(20) NULL ,
[TotalUP] float(53) NULL ,
[TotalMRP] float(53) NULL 
)


GO

-- ----------------------------
-- Records of INVInventoryLedger
-- ----------------------------
SET IDENTITY_INSERT [dbo].[INVInventoryLedger] ON
GO
SET IDENTITY_INSERT [dbo].[INVInventoryLedger] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[INVInventoryTransaction]
-- ----------------------------
DROP TABLE [dbo].[INVInventoryTransaction]
GO
CREATE TABLE [dbo].[INVInventoryTransaction] (
[TransID] bigint NOT NULL IDENTITY(1,1) ,
[TransNo] varchar(25) NOT NULL ,
[TransDate] datetime NULL ,
[TransType] nchar(20) NULL ,
[TransRefID] bigint NULL ,
[TransRefNo] varchar(25) NULL ,
[ItemID] bigint NOT NULL ,
[ItemUOM] varchar(20) NULL ,
[OPQty] float(53) NOT NULL ,
[INQty] float(53) NOT NULL ,
[OUTQty] float(53) NULL ,
[BalanceQty] float(53) NULL ,
[UP] float(53) NULL ,
[MRP] float(53) NULL ,
[Currency] varchar(20) NULL ,
[TotalUP] float(53) NULL ,
[TotalMRP] float(53) NULL 
)


GO

-- ----------------------------
-- Records of INVInventoryTransaction
-- ----------------------------
SET IDENTITY_INSERT [dbo].[INVInventoryTransaction] ON
GO
SET IDENTITY_INSERT [dbo].[INVInventoryTransaction] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[INVItem]
-- ----------------------------
DROP TABLE [dbo].[INVItem]
GO
CREATE TABLE [dbo].[INVItem] (
[ItemID] bigint NOT NULL IDENTITY(1,1) ,
[ItemCode] nvarchar(16) NULL ,
[ItemBarcode] nvarchar(32) NULL ,
[ItemName] nvarchar(128) NULL ,
[ItemUOM] nvarchar(16) NULL ,
[Active] bit NULL ,
[Description] nvarchar(MAX) NULL 
)


GO

-- ----------------------------
-- Records of INVItem
-- ----------------------------
SET IDENTITY_INSERT [dbo].[INVItem] ON
GO
INSERT INTO [dbo].[INVItem] ([ItemID], [ItemCode], [ItemBarcode], [ItemName], [ItemUOM], [Active], [Description]) VALUES (N'1', N'01', null, N'Potato (আলু)', N'KG', N'1', N'Potato (আলু)');
GO
SET IDENTITY_INSERT [dbo].[INVItem] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[INVItemCategory]
-- ----------------------------
DROP TABLE [dbo].[INVItemCategory]
GO
CREATE TABLE [dbo].[INVItemCategory] (
[CategoryID] int NOT NULL IDENTITY(1,1) ,
[CategoryCode] varchar(10) NULL ,
[CategoryName] varchar(50) NULL ,
[Description] varchar(MAX) NULL ,
[CategoryImage] image NULL ,
[CategoryForecolor] varchar(50) NULL 
)


GO

-- ----------------------------
-- Records of INVItemCategory
-- ----------------------------
SET IDENTITY_INSERT [dbo].[INVItemCategory] ON
GO
SET IDENTITY_INSERT [dbo].[INVItemCategory] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[INVItemDetail]
-- ----------------------------
DROP TABLE [dbo].[INVItemDetail]
GO
CREATE TABLE [dbo].[INVItemDetail] (
[RegistrationID] bigint NOT NULL ,
[BagNo] float(53) NOT NULL ,
[BagWeight] float(53) NULL ,
[BagFair] float(53) NULL ,
[TotalFair] float(53) NULL ,
[Advance] float(53) NULL ,
[Remarks] nvarchar(128) NULL ,
[ItemDetailID] bigint NOT NULL IDENTITY(1,1) ,
[ItemTypeID] int NOT NULL 
)


GO
DBCC CHECKIDENT(N'[dbo].[INVItemDetail]', RESEED, 22)
GO

-- ----------------------------
-- Records of INVItemDetail
-- ----------------------------
SET IDENTITY_INSERT [dbo].[INVItemDetail] ON
GO
INSERT INTO [dbo].[INVItemDetail] ([RegistrationID], [BagNo], [BagWeight], [BagFair], [TotalFair], [Advance], [Remarks], [ItemDetailID], [ItemTypeID]) VALUES (N'25', N'10', N'85', N'320', N'3200', N'1000', null, N'11', N'1');
GO
INSERT INTO [dbo].[INVItemDetail] ([RegistrationID], [BagNo], [BagWeight], [BagFair], [TotalFair], [Advance], [Remarks], [ItemDetailID], [ItemTypeID]) VALUES (N'25', N'10', N'85', N'320', N'3200', N'1000', null, N'13', N'4');
GO
INSERT INTO [dbo].[INVItemDetail] ([RegistrationID], [BagNo], [BagWeight], [BagFair], [TotalFair], [Advance], [Remarks], [ItemDetailID], [ItemTypeID]) VALUES (N'26', N'10', N'85', N'320', N'3200', N'1000', null, N'14', N'3');
GO
INSERT INTO [dbo].[INVItemDetail] ([RegistrationID], [BagNo], [BagWeight], [BagFair], [TotalFair], [Advance], [Remarks], [ItemDetailID], [ItemTypeID]) VALUES (N'26', N'25', N'60', N'320', N'1250', N'500', null, N'15', N'5');
GO
INSERT INTO [dbo].[INVItemDetail] ([RegistrationID], [BagNo], [BagWeight], [BagFair], [TotalFair], [Advance], [Remarks], [ItemDetailID], [ItemTypeID]) VALUES (N'31', N'50', N'60', N'250', N'12500', N'0', null, N'19', N'1');
GO
INSERT INTO [dbo].[INVItemDetail] ([RegistrationID], [BagNo], [BagWeight], [BagFair], [TotalFair], [Advance], [Remarks], [ItemDetailID], [ItemTypeID]) VALUES (N'33', N'10', N'85', N'320', N'3200', N'1000', null, N'20', N'2');
GO
INSERT INTO [dbo].[INVItemDetail] ([RegistrationID], [BagNo], [BagWeight], [BagFair], [TotalFair], [Advance], [Remarks], [ItemDetailID], [ItemTypeID]) VALUES (N'33', N'10', N'85', N'320', N'3200', N'1000', null, N'21', N'2');
GO
INSERT INTO [dbo].[INVItemDetail] ([RegistrationID], [BagNo], [BagWeight], [BagFair], [TotalFair], [Advance], [Remarks], [ItemDetailID], [ItemTypeID]) VALUES (N'33', N'20', N'60', N'250', N'5000', N'1200', null, N'22', N'5');
GO
SET IDENTITY_INSERT [dbo].[INVItemDetail] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[INVItemGroup]
-- ----------------------------
DROP TABLE [dbo].[INVItemGroup]
GO
CREATE TABLE [dbo].[INVItemGroup] (
[GroupID] int NOT NULL IDENTITY(1,1) ,
[GroupCode] varchar(10) NULL ,
[GroupName] varchar(50) NULL ,
[Description] varchar(MAX) NULL ,
[GroupImage] image NULL ,
[GroupForecolor] varchar(50) NULL 
)


GO

-- ----------------------------
-- Records of INVItemGroup
-- ----------------------------
SET IDENTITY_INSERT [dbo].[INVItemGroup] ON
GO
SET IDENTITY_INSERT [dbo].[INVItemGroup] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[INVItemInventory]
-- ----------------------------
DROP TABLE [dbo].[INVItemInventory]
GO
CREATE TABLE [dbo].[INVItemInventory] (
[ItemID] bigint NULL ,
[ItemDescription] varchar(MAX) NULL ,
[ItemQty] float(53) NULL ,
[UP] float(53) NULL ,
[MRP] float(53) NULL ,
[TotalUP] AS ([ItemQty]*[UP]) ,
[TotalMRP] AS ([ItemQty]*[MRP]) 
)


GO

-- ----------------------------
-- Records of INVItemInventory
-- ----------------------------

-- ----------------------------
-- Table structure for [dbo].[INVItemSize]
-- ----------------------------
DROP TABLE [dbo].[INVItemSize]
GO
CREATE TABLE [dbo].[INVItemSize] (
[SizeID] int NOT NULL IDENTITY(1,1) ,
[SizeCode] nvarchar(16) NULL ,
[SizeName] nvarchar(64) NULL ,
[ItemWeight] nvarchar(32) NULL ,
[ItemWeightUOM] nvarchar(50) NULL ,
[Description] nvarchar(MAX) NULL 
)


GO
DBCC CHECKIDENT(N'[dbo].[INVItemSize]', RESEED, 3)
GO

-- ----------------------------
-- Records of INVItemSize
-- ----------------------------
SET IDENTITY_INSERT [dbo].[INVItemSize] ON
GO
INSERT INTO [dbo].[INVItemSize] ([SizeID], [SizeCode], [SizeName], [ItemWeight], [ItemWeightUOM], [Description]) VALUES (N'1', N'B', N'Big (বড়)', N'85        ', N'KG', null);
GO
INSERT INTO [dbo].[INVItemSize] ([SizeID], [SizeCode], [SizeName], [ItemWeight], [ItemWeightUOM], [Description]) VALUES (N'2', N'M', N'Medium (মধ্যম)', N'50', N'KG', null);
GO
INSERT INTO [dbo].[INVItemSize] ([SizeID], [SizeCode], [SizeName], [ItemWeight], [ItemWeightUOM], [Description]) VALUES (N'3', N'S', N'Small (ছোট)', N'40', N'KG', null);
GO
SET IDENTITY_INSERT [dbo].[INVItemSize] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[INVItemType]
-- ----------------------------
DROP TABLE [dbo].[INVItemType]
GO
CREATE TABLE [dbo].[INVItemType] (
[TypeID] int NOT NULL IDENTITY(1,1) ,
[TypeCode] nvarchar(48) NULL ,
[TypeName] nvarchar(128) NULL ,
[Description] nvarchar(MAX) NULL 
)


GO
DBCC CHECKIDENT(N'[dbo].[INVItemType]', RESEED, 6)
GO

-- ----------------------------
-- Records of INVItemType
-- ----------------------------
SET IDENTITY_INSERT [dbo].[INVItemType] ON
GO
INSERT INTO [dbo].[INVItemType] ([TypeID], [TypeCode], [TypeName], [Description]) VALUES (N'1', N'Pakri', N'Pakri Supply (পাকড়ী সাপ্লাই)', N'Pakri Supply (পাকড়ী সাপ্লাই)');
GO
INSERT INTO [dbo].[INVItemType] ([TypeID], [TypeCode], [TypeName], [Description]) VALUES (N'2', N'Gutti', N'Guttir Beez (গুটির বীজ)', N'Guttir Beez (গুটির বীজ)');
GO
INSERT INTO [dbo].[INVItemType] ([TypeID], [TypeCode], [TypeName], [Description]) VALUES (N'3', N'Grand', N'Grand (গ্রান্ড)', N'Grand (গ্রান্ড)');
GO
INSERT INTO [dbo].[INVItemType] ([TypeID], [TypeCode], [TypeName], [Description]) VALUES (N'4', N'Cardinal', N'Cardinal (কার্ডিনাল)', N'Cardinal (কার্ডিনাল)');
GO
INSERT INTO [dbo].[INVItemType] ([TypeID], [TypeCode], [TypeName], [Description]) VALUES (N'5', N'Diamond', N'Diamond (ডায়মন্ড)', N'Diamond (ডায়মন্ড)');
GO
INSERT INTO [dbo].[INVItemType] ([TypeID], [TypeCode], [TypeName], [Description]) VALUES (N'6', N'Aesterix', N'Aesterix (এস্টেরিক্স)', N'Aesterix (এস্টেরিক্স)');
GO
SET IDENTITY_INSERT [dbo].[INVItemType] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[INVItemUOM]
-- ----------------------------
DROP TABLE [dbo].[INVItemUOM]
GO
CREATE TABLE [dbo].[INVItemUOM] (
[UOMID] int NOT NULL IDENTITY(1,1) ,
[UOMCode] varchar(10) NULL ,
[UOMName] varchar(50) NULL ,
[Description] varchar(MAX) NULL 
)


GO

-- ----------------------------
-- Records of INVItemUOM
-- ----------------------------
SET IDENTITY_INSERT [dbo].[INVItemUOM] ON
GO
SET IDENTITY_INSERT [dbo].[INVItemUOM] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[INVOpening]
-- ----------------------------
DROP TABLE [dbo].[INVOpening]
GO
CREATE TABLE [dbo].[INVOpening] (
[OpeningID] bigint NOT NULL IDENTITY(1,1) ,
[OpeningNo] varchar(10) NOT NULL ,
[OpeningDate] datetime NOT NULL ,
[Remarks] varchar(MAX) NULL ,
[OpeningSubtotal] float(53) NULL ,
[OpeningDiscount] float(53) NULL ,
[OpeningTotal] float(53) NULL ,
[UserID] int NULL DEFAULT ((0)) 
)


GO

-- ----------------------------
-- Records of INVOpening
-- ----------------------------
SET IDENTITY_INSERT [dbo].[INVOpening] ON
GO
SET IDENTITY_INSERT [dbo].[INVOpening] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[INVOpeningDetails]
-- ----------------------------
DROP TABLE [dbo].[INVOpeningDetails]
GO
CREATE TABLE [dbo].[INVOpeningDetails] (
[OpeningDetailsID] bigint NOT NULL IDENTITY(1,1) ,
[OpeningID] bigint NOT NULL ,
[ItemID] bigint NOT NULL ,
[ItemDescription] varchar(MAX) NULL ,
[OpeningQty] float(53) NULL ,
[OpeningRate] float(53) NULL ,
[TotalAmount] AS ([OpeningRate]*[OpeningQty]) 
)


GO

-- ----------------------------
-- Records of INVOpeningDetails
-- ----------------------------
SET IDENTITY_INSERT [dbo].[INVOpeningDetails] ON
GO
SET IDENTITY_INSERT [dbo].[INVOpeningDetails] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[INVParty]
-- ----------------------------
DROP TABLE [dbo].[INVParty]
GO
CREATE TABLE [dbo].[INVParty] (
[PartyID] int NOT NULL IDENTITY(1,1) ,
[PartyType] nvarchar(64) NULL ,
[PartyCode] nvarchar(32) NULL ,
[PartyName] nvarchar(128) NULL ,
[FatherName] nvarchar(128) NULL ,
[ContactNo] nvarchar(64) NULL ,
[Gender] nvarchar(16) NULL ,
[Religion] nvarchar(48) NULL ,
[AreaVillageName] nvarchar(128) NULL ,
[AreaPOName] nvarchar(128) NULL ,
[UpazilaPSID] int NULL ,
[DistrictID] int NULL ,
[Tel] nvarchar(64) NULL ,
[Cell] nvarchar(64) NULL ,
[Email] nvarchar(128) NULL ,
[PartyCodeName] nvarchar(128) NULL ,
[Remarks] nvarchar(MAX) NULL ,
[IsActive] bit NULL ,
[CreatedBy] uniqueidentifier NULL ,
[CreatedDate] datetime NULL ,
[ModifiedBy] uniqueidentifier NULL ,
[ModifiedDate] datetime NULL 
)


GO
DBCC CHECKIDENT(N'[dbo].[INVParty]', RESEED, 13)
GO

-- ----------------------------
-- Records of INVParty
-- ----------------------------
SET IDENTITY_INSERT [dbo].[INVParty] ON
GO
INSERT INTO [dbo].[INVParty] ([PartyID], [PartyType], [PartyCode], [PartyName], [FatherName], [ContactNo], [Gender], [Religion], [AreaVillageName], [AreaPOName], [UpazilaPSID], [DistrictID], [Tel], [Cell], [Email], [PartyCodeName], [Remarks], [IsActive], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'1', N'Agent (এজেন্ট)', N'A001', N'Shah Ismail', N'Miah', N'58778689679', N'Male', N'Islam', N'Saikpur', N'Abdullahpur', N'416', N'56', N'76786876', N'68698698', N'd', N'O001 - Shah Ismail', null, N'1', N'00000000-0000-0000-0000-000000000000', N'2013-01-23 16:31:16.423', N'00000000-0000-0000-0000-000000000000', N'2013-01-23 16:31:16.423');
GO
INSERT INTO [dbo].[INVParty] ([PartyID], [PartyType], [PartyCode], [PartyName], [FatherName], [ContactNo], [Gender], [Religion], [AreaVillageName], [AreaPOName], [UpazilaPSID], [DistrictID], [Tel], [Cell], [Email], [PartyCodeName], [Remarks], [IsActive], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'2', N'Party (পার্টি)', N'P002', N'John Doe', N'father', N'740970948709', N'Male', N'Islam', N'Saikpur', N'Abdullahpur', N'416', N'56', N'4454545', N'54545', N'45', N'P001 - Party', null, N'1', N'00000000-0000-0000-0000-000000000000', N'2013-01-23 16:26:51.590', N'00000000-0000-0000-0000-000000000000', N'2013-01-23 16:26:51.643');
GO
INSERT INTO [dbo].[INVParty] ([PartyID], [PartyType], [PartyCode], [PartyName], [FatherName], [ContactNo], [Gender], [Religion], [AreaVillageName], [AreaPOName], [UpazilaPSID], [DistrictID], [Tel], [Cell], [Email], [PartyCodeName], [Remarks], [IsActive], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'3', N'Party (পার্টি)', N'P003', N'জয়ন্ত', N'father', N'58778689679', N'Male', N'Islam', N'Saikpur', N'Abdullahpur', N'416', N'56', N'689798797', N'897897867', N'', N'P002 - জয়ন্ত', null, N'1', N'00000000-0000-0000-0000-000000000000', N'2013-01-23 16:27:32.470', N'00000000-0000-0000-0000-000000000000', N'2013-01-23 16:27:32.470');
GO
INSERT INTO [dbo].[INVParty] ([PartyID], [PartyType], [PartyCode], [PartyName], [FatherName], [ContactNo], [Gender], [Religion], [AreaVillageName], [AreaPOName], [UpazilaPSID], [DistrictID], [Tel], [Cell], [Email], [PartyCodeName], [Remarks], [IsActive], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'4', N'Company (কোম্পানী)', N'C004', N'Vertex', N'father', N'587587687687', N'Male', N'Islam', N'Saikpur', N'Abdullahpur', N'416', N'56', N'8798789789', N'567587587', N'', N'C001 - Company', null, N'1', N'00000000-0000-0000-0000-000000000000', N'2013-01-26 11:56:34.663', N'00000000-0000-0000-0000-000000000000', N'2013-01-26 11:56:34.663');
GO
INSERT INTO [dbo].[INVParty] ([PartyID], [PartyType], [PartyCode], [PartyName], [FatherName], [ContactNo], [Gender], [Religion], [AreaVillageName], [AreaPOName], [UpazilaPSID], [DistrictID], [Tel], [Cell], [Email], [PartyCodeName], [Remarks], [IsActive], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'5', N'Party (পার্টি)', N'P005', N'Halim', N'Kashem', N'577657567', N'Male', N'Islam', N'ytyty', N'hffhfh', N'42', N'3', N'5654675767', N'7', N'', N'P0012 - Halim', null, N'1', N'BE693668-F39A-4511-8E1F-BCFE2A05DE01', N'2013-01-01 18:49:04.557', N'BE693668-F39A-4511-8E1F-BCFE2A05DE01', N'2013-01-01 18:49:04.567');
GO
INSERT INTO [dbo].[INVParty] ([PartyID], [PartyType], [PartyCode], [PartyName], [FatherName], [ContactNo], [Gender], [Religion], [AreaVillageName], [AreaPOName], [UpazilaPSID], [DistrictID], [Tel], [Cell], [Email], [PartyCodeName], [Remarks], [IsActive], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'8', N'Farmer (কৃষক)', N'F008', N'Krishok', N'abbu', N'019299399123', N'Male', N'Hindu', N'Dhunot', N'Box', N'42', N'5', N'0199119922', N'0119922882', N'saad0209@gmail.com', N'F001 - Farmer', null, N'1', N'BE693668-F39A-4511-8E1F-BCFE2A05DE01', N'2013-01-26 10:53:51.630', N'BE693668-F39A-4511-8E1F-BCFE2A05DE01', N'2013-01-26 10:53:51.730');
GO
INSERT INTO [dbo].[INVParty] ([PartyID], [PartyType], [PartyCode], [PartyName], [FatherName], [ContactNo], [Gender], [Religion], [AreaVillageName], [AreaPOName], [UpazilaPSID], [DistrictID], [Tel], [Cell], [Email], [PartyCodeName], [Remarks], [IsActive], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'11', N'Agent (এজেন্ট)', N'A009', N'Shad', N'Father', N'01674977760', N'Male', N'Islam', N'dhaka', N'dhaka', N'112', N'13', N'8110686', N'', N'', N'A009 - Shad', null, N'1', N'00000000-0000-0000-0000-000000000000', N'2013-02-03 11:45:07.863', N'00000000-0000-0000-0000-000000000000', N'2013-02-03 11:45:07.867');
GO
INSERT INTO [dbo].[INVParty] ([PartyID], [PartyType], [PartyCode], [PartyName], [FatherName], [ContactNo], [Gender], [Religion], [AreaVillageName], [AreaPOName], [UpazilaPSID], [DistrictID], [Tel], [Cell], [Email], [PartyCodeName], [Remarks], [IsActive], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'12', N'Party (পার্টি)', N'P010', N'Ishtiaq', N'Vai', N'01674977760', N'Male', N'Islam', N'Dhaka', N'Dhaka', N'12', N'2', N'', N'', N'', N'P010 - Ishtiaq', null, N'1', N'00000000-0000-0000-0000-000000000000', N'2013-02-03 11:56:48.500', N'00000000-0000-0000-0000-000000000000', N'2013-02-03 11:56:48.500');
GO
INSERT INTO [dbo].[INVParty] ([PartyID], [PartyType], [PartyCode], [PartyName], [FatherName], [ContactNo], [Gender], [Religion], [AreaVillageName], [AreaPOName], [UpazilaPSID], [DistrictID], [Tel], [Cell], [Email], [PartyCodeName], [Remarks], [IsActive], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'13', N'Party (পার্টি)', N'P011', N'Jobaer', N'Vai', N'01674977760', N'Male', N'Islam', N'Dhaka', N'dhaka', N'43', N'6', N'', N'', N'', N'P011 - Jobaer', null, N'1', N'00000000-0000-0000-0000-000000000000', N'2013-02-03 11:58:35.523', N'00000000-0000-0000-0000-000000000000', N'2013-02-03 11:58:35.527');
GO
SET IDENTITY_INSERT [dbo].[INVParty] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[INVPermission]
-- ----------------------------
DROP TABLE [dbo].[INVPermission]
GO
CREATE TABLE [dbo].[INVPermission] (
[PermissionID] bigint NOT NULL ,
[UserModule] varchar(50) NULL ,
[UserInterface] varchar(150) NULL 
)


GO

-- ----------------------------
-- Records of INVPermission
-- ----------------------------

-- ----------------------------
-- Table structure for [dbo].[INVPurchase]
-- ----------------------------
DROP TABLE [dbo].[INVPurchase]
GO
CREATE TABLE [dbo].[INVPurchase] (
[PurchaseID] bigint NOT NULL IDENTITY(1,1) ,
[PurchaseNo] varchar(10) NOT NULL ,
[PurchaseDate] datetime NOT NULL ,
[SupplierID] int NOT NULL ,
[Remarks] varchar(MAX) NULL ,
[PurchaseSubtotal] float(53) NULL ,
[PurchaseDiscount] float(53) NULL ,
[PurchaseTotal] float(53) NULL ,
[UserID] int NULL DEFAULT ((0)) 
)


GO

-- ----------------------------
-- Records of INVPurchase
-- ----------------------------
SET IDENTITY_INSERT [dbo].[INVPurchase] ON
GO
SET IDENTITY_INSERT [dbo].[INVPurchase] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[INVPurchaseDetails]
-- ----------------------------
DROP TABLE [dbo].[INVPurchaseDetails]
GO
CREATE TABLE [dbo].[INVPurchaseDetails] (
[PurchaseDetailsID] bigint NOT NULL IDENTITY(1,1) ,
[PurchaseID] bigint NOT NULL ,
[ItemID] bigint NOT NULL ,
[ItemDescription] varchar(MAX) NULL ,
[PurchaseQty] float(53) NULL ,
[PurchaseRate] float(53) NULL ,
[TotalAmount] AS ([PurchaseRate]*[PurchaseQty]) 
)


GO

-- ----------------------------
-- Records of INVPurchaseDetails
-- ----------------------------
SET IDENTITY_INSERT [dbo].[INVPurchaseDetails] ON
GO
SET IDENTITY_INSERT [dbo].[INVPurchaseDetails] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[INVRelocate]
-- ----------------------------
DROP TABLE [dbo].[INVRelocate]
GO
CREATE TABLE [dbo].[INVRelocate] (
[RelocateID] bigint NOT NULL IDENTITY(1,1) ,
[SerialID] bigint NULL ,
[SerialNo] nvarchar(64) NULL ,
[PartyCode] nvarchar(100) NULL ,
[Chamber] int NULL ,
[Floor] int NULL ,
[Pocket] int NULL ,
[Line] int NULL ,
[RelocationCount] int NULL ,
[Remarks] nvarchar(MAX) NULL ,
[CreatedBy] uniqueidentifier NULL ,
[CreatedDate] datetime NULL 
)


GO
DBCC CHECKIDENT(N'[dbo].[INVRelocate]', RESEED, 2)
GO

-- ----------------------------
-- Records of INVRelocate
-- ----------------------------
SET IDENTITY_INSERT [dbo].[INVRelocate] ON
GO
INSERT INTO [dbo].[INVRelocate] ([RelocateID], [SerialID], [SerialNo], [PartyCode], [Chamber], [Floor], [Pocket], [Line], [RelocationCount], [Remarks], [CreatedBy], [CreatedDate]) VALUES (N'1', N'22', N'222/22', N'P002', N'2', N'2', N'2', N'3', N'0', null, N'00000000-0000-0000-0000-000000000000', N'2013-02-03 13:06:42.223');
GO
INSERT INTO [dbo].[INVRelocate] ([RelocateID], [SerialID], [SerialNo], [PartyCode], [Chamber], [Floor], [Pocket], [Line], [RelocationCount], [Remarks], [CreatedBy], [CreatedDate]) VALUES (N'2', N'22', N'222/22', N'P002', N'2', N'10', N'2', N'3', N'1', null, N'00000000-0000-0000-0000-000000000000', N'2013-02-03 13:51:53.877');
GO
SET IDENTITY_INSERT [dbo].[INVRelocate] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[INVSales]
-- ----------------------------
DROP TABLE [dbo].[INVSales]
GO
CREATE TABLE [dbo].[INVSales] (
[SalesID] bigint NOT NULL IDENTITY(1,1) ,
[SalesNo] varchar(10) NOT NULL ,
[SalesDate] datetime NOT NULL ,
[CustomerID] int NOT NULL DEFAULT ((0)) ,
[SalesSubtotal] float(53) NULL DEFAULT ((0)) ,
[SalesVAT] float(53) NULL DEFAULT ((0)) ,
[SalesDiscount] float(53) NULL DEFAULT ((0)) ,
[SalesTotal] float(53) NULL DEFAULT ((0)) ,
[PaidAmount] float(53) NULL DEFAULT ((0)) ,
[DuesAmount] float(53) NULL DEFAULT ((0)) ,
[ReturnAmount] float(53) NULL ,
[UserID] int NULL DEFAULT ((0)) ,
[TerminalID] nchar(2) NULL 
)


GO

-- ----------------------------
-- Records of INVSales
-- ----------------------------
SET IDENTITY_INSERT [dbo].[INVSales] ON
GO
SET IDENTITY_INSERT [dbo].[INVSales] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[INVSalesDetails]
-- ----------------------------
DROP TABLE [dbo].[INVSalesDetails]
GO
CREATE TABLE [dbo].[INVSalesDetails] (
[SalesDetailsID] bigint NOT NULL IDENTITY(1,1) ,
[SalesID] bigint NOT NULL ,
[ItemID] bigint NOT NULL DEFAULT ((0)) ,
[ItemName] varchar(50) NULL ,
[ItemDescription] varchar(MAX) NULL ,
[SalesQty] float(53) NULL DEFAULT ((0)) ,
[SalesRate] float(53) NULL DEFAULT ((0)) ,
[SalesVAT] float(53) NULL DEFAULT ((0)) ,
[TotalAmount] AS ([SalesRate]*[SalesQty]+[SalesVAT]) 
)


GO

-- ----------------------------
-- Records of INVSalesDetails
-- ----------------------------
SET IDENTITY_INSERT [dbo].[INVSalesDetails] ON
GO
SET IDENTITY_INSERT [dbo].[INVSalesDetails] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[INVStockLoading]
-- ----------------------------
DROP TABLE [dbo].[INVStockLoading]
GO
CREATE TABLE [dbo].[INVStockLoading] (
[LoadingID] bigint NOT NULL IDENTITY(1,1) ,
[SerialID] bigint NOT NULL ,
[SerialNo] nvarchar(64) NOT NULL ,
[Bags] float(53) NOT NULL ,
[PartyCode] nvarchar(16) NOT NULL ,
[ChamberNo] int NOT NULL ,
[Floor] int NOT NULL ,
[Pocket] int NOT NULL ,
[Line] int NULL ,
[Remarks] nvarchar(MAX) NULL ,
[Relocated] datetime NULL ,
[RelocatedCount] int NOT NULL DEFAULT ((0)) ,
[LoadedDate] datetime NULL 
)


GO
DBCC CHECKIDENT(N'[dbo].[INVStockLoading]', RESEED, 30)
GO

-- ----------------------------
-- Records of INVStockLoading
-- ----------------------------
SET IDENTITY_INSERT [dbo].[INVStockLoading] ON
GO
INSERT INTO [dbo].[INVStockLoading] ([LoadingID], [SerialID], [SerialNo], [Bags], [PartyCode], [ChamberNo], [Floor], [Pocket], [Line], [Remarks], [Relocated], [RelocatedCount], [LoadedDate]) VALUES (N'12', N'13', N'213/35', N'35', N'A001', N'1', N'1', N'1', N'1', N'1st entry', null, N'0', N'2013-01-26 12:20:58.000');
GO
INSERT INTO [dbo].[INVStockLoading] ([LoadingID], [SerialID], [SerialNo], [Bags], [PartyCode], [ChamberNo], [Floor], [Pocket], [Line], [Remarks], [Relocated], [RelocatedCount], [LoadedDate]) VALUES (N'13', N'12', N'212/30', N'30', N'C004', N'1', N'1', N'1', N'1', N'2nd entry', null, N'0', N'2013-01-09 12:21:02.000');
GO
INSERT INTO [dbo].[INVStockLoading] ([LoadingID], [SerialID], [SerialNo], [Bags], [PartyCode], [ChamberNo], [Floor], [Pocket], [Line], [Remarks], [Relocated], [RelocatedCount], [LoadedDate]) VALUES (N'14', N'11', N'211/30', N'20', N'C004', N'3', N'2', N'2', N'1', N'just arrived', N'2013-01-23 15:43:08.950', N'1', N'2013-01-09 12:21:02.000');
GO
INSERT INTO [dbo].[INVStockLoading] ([LoadingID], [SerialID], [SerialNo], [Bags], [PartyCode], [ChamberNo], [Floor], [Pocket], [Line], [Remarks], [Relocated], [RelocatedCount], [LoadedDate]) VALUES (N'15', N'10', N'210/25', N'25', N'C004', N'2', N'2', N'2', N'1', N'just arrived', N'2013-01-23 15:36:14.000', N'1', N'2013-01-09 12:21:02.000');
GO
INSERT INTO [dbo].[INVStockLoading] ([LoadingID], [SerialID], [SerialNo], [Bags], [PartyCode], [ChamberNo], [Floor], [Pocket], [Line], [Remarks], [Relocated], [RelocatedCount], [LoadedDate]) VALUES (N'16', N'9', N'209/20', N'20', N'C004', N'2', N'1', N'1', N'1', N'just arrived', N'2013-01-23 15:42:51.403', N'1', N'2013-01-09 12:21:02.000');
GO
INSERT INTO [dbo].[INVStockLoading] ([LoadingID], [SerialID], [SerialNo], [Bags], [PartyCode], [ChamberNo], [Floor], [Pocket], [Line], [Remarks], [Relocated], [RelocatedCount], [LoadedDate]) VALUES (N'17', N'7', N'207/1', N'1', N'A001', N'2', N'3', N'3', N'2', N'just arrived', N'2013-01-26 13:51:01.273', N'1', N'2013-01-09 12:21:02.000');
GO
INSERT INTO [dbo].[INVStockLoading] ([LoadingID], [SerialID], [SerialNo], [Bags], [PartyCode], [ChamberNo], [Floor], [Pocket], [Line], [Remarks], [Relocated], [RelocatedCount], [LoadedDate]) VALUES (N'18', N'3', N'203/40', N'30', N'A001', N'3', N'6', N'6', N'3', N'just arrived', N'2013-01-26 13:54:06.390', N'1', N'2013-01-09 12:21:02.000');
GO
INSERT INTO [dbo].[INVStockLoading] ([LoadingID], [SerialID], [SerialNo], [Bags], [PartyCode], [ChamberNo], [Floor], [Pocket], [Line], [Remarks], [Relocated], [RelocatedCount], [LoadedDate]) VALUES (N'21', N'14', N'214/20', N'10', N'P002', N'2', N'1', N'1', N'1', N'', null, N'0', N'2013-01-09 12:21:02.000');
GO
INSERT INTO [dbo].[INVStockLoading] ([LoadingID], [SerialID], [SerialNo], [Bags], [PartyCode], [ChamberNo], [Floor], [Pocket], [Line], [Remarks], [Relocated], [RelocatedCount], [LoadedDate]) VALUES (N'22', N'8', N'208/40', N'30', N'P002', N'3', N'15', N'15', N'2', N'', N'2013-02-02 19:03:59.647', N'1', N'2013-01-17 13:46:10.000');
GO
INSERT INTO [dbo].[INVStockLoading] ([LoadingID], [SerialID], [SerialNo], [Bags], [PartyCode], [ChamberNo], [Floor], [Pocket], [Line], [Remarks], [Relocated], [RelocatedCount], [LoadedDate]) VALUES (N'23', N'6', N'206/45', N'40', N'P002', N'2', N'1', N'1', N'1', N'', N'2013-01-26 16:47:25.520', N'1', N'2013-01-26 12:36:11.833');
GO
INSERT INTO [dbo].[INVStockLoading] ([LoadingID], [SerialID], [SerialNo], [Bags], [PartyCode], [ChamberNo], [Floor], [Pocket], [Line], [Remarks], [Relocated], [RelocatedCount], [LoadedDate]) VALUES (N'24', N'5', N'205/50', N'40', N'P002', N'2', N'4', N'4', N'1', N'', N'2013-01-26 13:50:04.137', N'1', N'2013-01-26 12:36:50.987');
GO
INSERT INTO [dbo].[INVStockLoading] ([LoadingID], [SerialID], [SerialNo], [Bags], [PartyCode], [ChamberNo], [Floor], [Pocket], [Line], [Remarks], [Relocated], [RelocatedCount], [LoadedDate]) VALUES (N'25', N'4', N'204/25', N'2', N'P002', N'3', N'2', N'2', N'1', N'', N'2013-01-26 13:48:50.760', N'1', N'2013-01-26 12:44:30.723');
GO
INSERT INTO [dbo].[INVStockLoading] ([LoadingID], [SerialID], [SerialNo], [Bags], [PartyCode], [ChamberNo], [Floor], [Pocket], [Line], [Remarks], [Relocated], [RelocatedCount], [LoadedDate]) VALUES (N'26', N'2', N'202/30', N'10', N'P003', N'2', N'3', N'3', N'1', N'', null, N'0', N'2013-01-26 16:43:58.283');
GO
INSERT INTO [dbo].[INVStockLoading] ([LoadingID], [SerialID], [SerialNo], [Bags], [PartyCode], [ChamberNo], [Floor], [Pocket], [Line], [Remarks], [Relocated], [RelocatedCount], [LoadedDate]) VALUES (N'27', N'1', N'201/20', N'5', N'P002', N'3', N'3', N'3', N'1', N'', N'2013-01-26 16:52:47.337', N'2', N'2013-01-26 16:51:15.277');
GO
INSERT INTO [dbo].[INVStockLoading] ([LoadingID], [SerialID], [SerialNo], [Bags], [PartyCode], [ChamberNo], [Floor], [Pocket], [Line], [Remarks], [Relocated], [RelocatedCount], [LoadedDate]) VALUES (N'28', N'23', N'223/20', N'20', N'C004', N'3', N'11', N'2', N'1', N'', N'2013-02-03 12:32:38.560', N'4', N'2013-02-02 19:01:38.223');
GO
INSERT INTO [dbo].[INVStockLoading] ([LoadingID], [SerialID], [SerialNo], [Bags], [PartyCode], [ChamberNo], [Floor], [Pocket], [Line], [Remarks], [Relocated], [RelocatedCount], [LoadedDate]) VALUES (N'29', N'22', N'222/20', N'22', N'P002', N'3', N'1', N'1', N'1', N'', null, N'0', N'2013-02-02 19:01:56.333');
GO
INSERT INTO [dbo].[INVStockLoading] ([LoadingID], [SerialID], [SerialNo], [Bags], [PartyCode], [ChamberNo], [Floor], [Pocket], [Line], [Remarks], [Relocated], [RelocatedCount], [LoadedDate]) VALUES (N'30', N'22', N'222/22', N'22', N'P002', N'2', N'12', N'2', N'3', N'', N'2013-02-03 13:51:53.817', N'2', N'2013-02-03 12:48:14.193');
GO
SET IDENTITY_INSERT [dbo].[INVStockLoading] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[INVStockSerial]
-- ----------------------------
DROP TABLE [dbo].[INVStockSerial]
GO
CREATE TABLE [dbo].[INVStockSerial] (
[SerialID] bigint NOT NULL IDENTITY(1,1) ,
[SerialDate] datetime NULL ,
[Serial] int NULL ,
[Bags] float(53) NULL ,
[SerialNo] nvarchar(64) NULL ,
[PartyID] int NULL ,
[PartyCode] nvarchar(16) NULL ,
[Remarks] nvarchar(MAX) NULL ,
[CreatedBy] uniqueidentifier NULL ,
[CreatedDate] datetime NULL ,
[ModifiedBy] uniqueidentifier NULL ,
[ModifiedDate] datetime NULL 
)


GO
DBCC CHECKIDENT(N'[dbo].[INVStockSerial]', RESEED, 23)
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'INVStockSerial', 
'COLUMN', N'SerialNo')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'Serial/Bags'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'INVStockSerial'
, @level2type = 'COLUMN', @level2name = N'SerialNo'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'Serial/Bags'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'INVStockSerial'
, @level2type = 'COLUMN', @level2name = N'SerialNo'
GO

-- ----------------------------
-- Records of INVStockSerial
-- ----------------------------
SET IDENTITY_INSERT [dbo].[INVStockSerial] ON
GO
INSERT INTO [dbo].[INVStockSerial] ([SerialID], [SerialDate], [Serial], [Bags], [SerialNo], [PartyID], [PartyCode], [Remarks], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'1', N'2012-12-23 00:00:00.000', N'201', N'5', N'201/20', N'2', N'P002', N'hhhghg', N'BE693668-F39A-4511-8E1F-BCFE2A05DE01', N'2012-12-23 22:04:57.800', N'00000000-0000-0000-0000-000000000000', N'2013-01-27 13:56:03.247');
GO
INSERT INTO [dbo].[INVStockSerial] ([SerialID], [SerialDate], [Serial], [Bags], [SerialNo], [PartyID], [PartyCode], [Remarks], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'2', N'2012-12-23 00:00:00.000', N'202', N'10', N'202/30', N'3', N'P003', N'tyty', N'BE693668-F39A-4511-8E1F-BCFE2A05DE01', N'2012-12-23 22:10:07.300', N'BE693668-F39A-4511-8E1F-BCFE2A05DE01', N'2012-12-23 22:10:07.100');
GO
INSERT INTO [dbo].[INVStockSerial] ([SerialID], [SerialDate], [Serial], [Bags], [SerialNo], [PartyID], [PartyCode], [Remarks], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'3', N'2012-12-23 00:00:00.000', N'203', N'30', N'203/40', N'1', N'A001', N'tryt', N'BE693668-F39A-4511-8E1F-BCFE2A05DE01', N'2012-12-23 22:12:37.357', N'BE693668-F39A-4511-8E1F-BCFE2A05DE01', N'2012-12-23 22:12:37.360');
GO
INSERT INTO [dbo].[INVStockSerial] ([SerialID], [SerialDate], [Serial], [Bags], [SerialNo], [PartyID], [PartyCode], [Remarks], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'4', N'2012-12-23 00:00:00.000', N'204', N'2', N'204/25', N'2', N'P002', N'kjgkjg', N'BE693668-F39A-4511-8E1F-BCFE2A05DE01', N'2012-12-23 22:30:49.937', N'BE693668-F39A-4511-8E1F-BCFE2A05DE01', N'2012-12-23 22:30:49.940');
GO
INSERT INTO [dbo].[INVStockSerial] ([SerialID], [SerialDate], [Serial], [Bags], [SerialNo], [PartyID], [PartyCode], [Remarks], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'5', N'2012-12-23 00:00:00.000', N'205', N'40', N'205/50', N'2', N'P002', N'remarks changed', N'BE693668-F39A-4511-8E1F-BCFE2A05DE01', N'2012-12-23 22:32:13.270', N'00000000-0000-0000-0000-000000000000', N'2013-01-24 14:25:57.770');
GO
INSERT INTO [dbo].[INVStockSerial] ([SerialID], [SerialDate], [Serial], [Bags], [SerialNo], [PartyID], [PartyCode], [Remarks], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'6', N'2012-12-24 00:00:00.000', N'206', N'40', N'206/45', N'2', N'P002', N'changed', N'BE693668-F39A-4511-8E1F-BCFE2A05DE01', N'2012-12-24 17:09:04.990', N'00000000-0000-0000-0000-000000000000', N'2013-01-26 13:56:19.847');
GO
INSERT INTO [dbo].[INVStockSerial] ([SerialID], [SerialDate], [Serial], [Bags], [SerialNo], [PartyID], [PartyCode], [Remarks], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'7', N'2012-12-29 00:00:00.000', N'207', N'1', N'207/1', N'1', N'A001', N'hi there', N'BE693668-F39A-4511-8E1F-BCFE2A05DE01', N'2012-12-29 21:13:06.770', N'BE693668-F39A-4511-8E1F-BCFE2A05DE01', N'2012-12-29 21:13:06.830');
GO
INSERT INTO [dbo].[INVStockSerial] ([SerialID], [SerialDate], [Serial], [Bags], [SerialNo], [PartyID], [PartyCode], [Remarks], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'8', N'2012-12-30 00:00:00.000', N'208', N'30', N'208/40', N'2', N'P002', N'hgfg', N'BE693668-F39A-4511-8E1F-BCFE2A05DE01', N'2012-12-30 15:39:44.963', N'BE693668-F39A-4511-8E1F-BCFE2A05DE01', N'2012-12-30 15:39:44.970');
GO
INSERT INTO [dbo].[INVStockSerial] ([SerialID], [SerialDate], [Serial], [Bags], [SerialNo], [PartyID], [PartyCode], [Remarks], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'9', N'2012-12-30 00:00:00.000', N'209', N'20', N'209/20', N'4', N'C004', N'gfgf', N'00000000-0000-0000-0000-000000000000', N'2012-12-30 21:28:55.227', N'00000000-0000-0000-0000-000000000000', N'2012-12-30 21:28:57.857');
GO
INSERT INTO [dbo].[INVStockSerial] ([SerialID], [SerialDate], [Serial], [Bags], [SerialNo], [PartyID], [PartyCode], [Remarks], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'10', N'2012-12-30 00:00:00.000', N'210', N'25', N'210/25', N'4', N'C004', N'trtremarks', N'00000000-0000-0000-0000-000000000000', N'2012-12-30 21:31:06.337', N'BE693668-F39A-4511-8E1F-BCFE2A05DE01', N'2013-01-26 16:50:25.130');
GO
INSERT INTO [dbo].[INVStockSerial] ([SerialID], [SerialDate], [Serial], [Bags], [SerialNo], [PartyID], [PartyCode], [Remarks], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'11', N'2012-12-30 00:00:00.000', N'211', N'20', N'211/20', N'4', N'C004', N'ghgfh', N'00000000-0000-0000-0000-000000000000', N'2012-12-30 21:32:44.160', N'00000000-0000-0000-0000-000000000000', N'2012-12-30 21:32:45.500');
GO
INSERT INTO [dbo].[INVStockSerial] ([SerialID], [SerialDate], [Serial], [Bags], [SerialNo], [PartyID], [PartyCode], [Remarks], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'12', N'2012-12-30 00:00:00.000', N'212', N'30', N'212/30', N'4', N'C004', N'remarks', N'BE693668-F39A-4511-8E1F-BCFE2A05DE01', N'2012-12-30 21:40:41.163', N'BE693668-F39A-4511-8E1F-BCFE2A05DE01', N'2013-01-26 16:41:54.323');
GO
INSERT INTO [dbo].[INVStockSerial] ([SerialID], [SerialDate], [Serial], [Bags], [SerialNo], [PartyID], [PartyCode], [Remarks], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'13', N'2013-01-23 00:00:00.000', N'213', N'35', N'213/35', N'1', N'A001', N'hdnPartyID', N'BE693668-F39A-4511-8E1F-BCFE2A05DE01', N'2013-01-23 13:59:47.707', N'00000000-0000-0000-0000-000000000000', N'2013-01-24 11:04:30.597');
GO
INSERT INTO [dbo].[INVStockSerial] ([SerialID], [SerialDate], [Serial], [Bags], [SerialNo], [PartyID], [PartyCode], [Remarks], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'14', N'2013-01-24 00:00:00.000', N'214', N'10', N'214/20', N'2', N'P002', N'party''r Alu', N'00000000-0000-0000-0000-000000000000', N'2013-01-24 10:22:03.463', N'00000000-0000-0000-0000-000000000000', N'2013-01-24 10:22:03.463');
GO
INSERT INTO [dbo].[INVStockSerial] ([SerialID], [SerialDate], [Serial], [Bags], [SerialNo], [PartyID], [PartyCode], [Remarks], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'15', N'2013-01-28 11:32:20.000', N'215', N'100', N'215/100', N'8', N'F008', N'', N'00000000-0000-0000-0000-000000000000', N'2013-01-28 11:32:12.370', N'00000000-0000-0000-0000-000000000000', N'2013-01-28 11:32:12.370');
GO
INSERT INTO [dbo].[INVStockSerial] ([SerialID], [SerialDate], [Serial], [Bags], [SerialNo], [PartyID], [PartyCode], [Remarks], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'16', N'2013-01-31 14:17:00.577', N'216', N'20', N'216/20', N'8', N'F008', N'', N'00000000-0000-0000-0000-000000000000', N'2013-01-31 14:17:00.577', N'00000000-0000-0000-0000-000000000000', N'2013-01-31 14:17:00.577');
GO
INSERT INTO [dbo].[INVStockSerial] ([SerialID], [SerialDate], [Serial], [Bags], [SerialNo], [PartyID], [PartyCode], [Remarks], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'17', N'2013-01-31 14:17:19.697', N'217', N'12', N'217/12', N'8', N'F008', N'', N'00000000-0000-0000-0000-000000000000', N'2013-01-31 14:17:19.697', N'00000000-0000-0000-0000-000000000000', N'2013-01-31 14:17:19.697');
GO
INSERT INTO [dbo].[INVStockSerial] ([SerialID], [SerialDate], [Serial], [Bags], [SerialNo], [PartyID], [PartyCode], [Remarks], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'18', N'2013-01-31 14:17:38.963', N'218', N'20', N'218/20', N'8', N'F008', N'', N'00000000-0000-0000-0000-000000000000', N'2013-01-31 14:17:38.963', N'00000000-0000-0000-0000-000000000000', N'2013-01-31 14:17:38.963');
GO
INSERT INTO [dbo].[INVStockSerial] ([SerialID], [SerialDate], [Serial], [Bags], [SerialNo], [PartyID], [PartyCode], [Remarks], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'19', N'2013-01-31 14:18:07.473', N'219', N'18', N'219/18', N'3', N'P003', N'', N'00000000-0000-0000-0000-000000000000', N'2013-01-31 14:18:07.473', N'00000000-0000-0000-0000-000000000000', N'2013-01-31 14:18:07.473');
GO
INSERT INTO [dbo].[INVStockSerial] ([SerialID], [SerialDate], [Serial], [Bags], [SerialNo], [PartyID], [PartyCode], [Remarks], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'20', N'2013-01-31 14:18:27.830', N'220', N'14', N'220/14', N'3', N'P003', N'', N'00000000-0000-0000-0000-000000000000', N'2013-01-31 14:18:27.830', N'00000000-0000-0000-0000-000000000000', N'2013-01-31 14:18:27.830');
GO
INSERT INTO [dbo].[INVStockSerial] ([SerialID], [SerialDate], [Serial], [Bags], [SerialNo], [PartyID], [PartyCode], [Remarks], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'21', N'2013-01-31 14:18:50.570', N'221', N'13', N'221/13', N'2', N'P002', N'', N'00000000-0000-0000-0000-000000000000', N'2013-01-31 14:18:50.570', N'00000000-0000-0000-0000-000000000000', N'2013-01-31 14:18:50.570');
GO
INSERT INTO [dbo].[INVStockSerial] ([SerialID], [SerialDate], [Serial], [Bags], [SerialNo], [PartyID], [PartyCode], [Remarks], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'22', N'2013-01-31 14:19:16.567', N'222', N'22', N'222/22', N'2', N'P002', N'', N'00000000-0000-0000-0000-000000000000', N'2013-01-31 14:19:16.567', N'00000000-0000-0000-0000-000000000000', N'2013-01-31 14:19:16.567');
GO
INSERT INTO [dbo].[INVStockSerial] ([SerialID], [SerialDate], [Serial], [Bags], [SerialNo], [PartyID], [PartyCode], [Remarks], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'23', N'2013-02-02 19:00:56.860', N'223', N'20', N'223/20', N'4', N'C004', N'', N'00000000-0000-0000-0000-000000000000', N'2013-02-02 19:00:56.860', N'00000000-0000-0000-0000-000000000000', N'2013-02-02 19:00:56.860');
GO
SET IDENTITY_INSERT [dbo].[INVStockSerial] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[INVSupplier]
-- ----------------------------
DROP TABLE [dbo].[INVSupplier]
GO
CREATE TABLE [dbo].[INVSupplier] (
[SupplierID] int NOT NULL IDENTITY(1,1) ,
[AccountID] bigint NULL ,
[SupplierCode] varchar(15) NOT NULL ,
[SupplierName] varchar(100) NOT NULL ,
[SupplierAddress] varchar(MAX) NOT NULL ,
[SupplierTel] varchar(50) NULL ,
[SupplierFax] varchar(50) NULL ,
[SupplierEmail] varchar(50) NULL ,
[SupplierWeb] varchar(50) NULL ,
[SupplierContactName] varchar(100) NULL ,
[SupplierContactAddress] varchar(MAX) NULL ,
[SupplierContactTel] varchar(50) NULL ,
[SupplierContactMobile] varchar(50) NULL ,
[SupplierContactEmail] varchar(50) NULL ,
[Remarks] varchar(MAX) NULL ,
[Active] tinyint NULL ,
[SupplierContactPhoto] image NULL ,
[SupplierAccountNo] bigint NULL ,
[SupplierAccountSubtypeNo] smallint NULL ,
[SupplierAccountOpening] float(53) NULL ,
[SupplierCurrency] varchar(50) NULL 
)


GO

-- ----------------------------
-- Records of INVSupplier
-- ----------------------------
SET IDENTITY_INSERT [dbo].[INVSupplier] ON
GO
SET IDENTITY_INSERT [dbo].[INVSupplier] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[INVUOM]
-- ----------------------------
DROP TABLE [dbo].[INVUOM]
GO
CREATE TABLE [dbo].[INVUOM] (
[UOMID] bigint NOT NULL IDENTITY(1,1) ,
[UOMCode] varchar(5) NOT NULL ,
[UOMName] varchar(50) NULL ,
[Description] varchar(100) NULL 
)


GO

-- ----------------------------
-- Records of INVUOM
-- ----------------------------
SET IDENTITY_INSERT [dbo].[INVUOM] ON
GO
SET IDENTITY_INSERT [dbo].[INVUOM] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[INVUser]
-- ----------------------------
DROP TABLE [dbo].[INVUser]
GO
CREATE TABLE [dbo].[INVUser] (
[UserID] bigint NOT NULL IDENTITY(1,1) ,
[UserName] varchar(10) NULL ,
[UserPassword] varchar(10) NULL ,
[UserRole] varchar(50) NULL ,
[FullName] varchar(50) NULL ,
[UserEmail] varchar(100) NULL ,
[LogInDate] datetime NULL 
)


GO

-- ----------------------------
-- Records of INVUser
-- ----------------------------
SET IDENTITY_INSERT [dbo].[INVUser] ON
GO
SET IDENTITY_INSERT [dbo].[INVUser] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[INVUserPermission]
-- ----------------------------
DROP TABLE [dbo].[INVUserPermission]
GO
CREATE TABLE [dbo].[INVUserPermission] (
[UserPermissionID] bigint NOT NULL ,
[UserID] int NULL ,
[UserModule] varchar(50) NULL ,
[UserInterface] varchar(150) NULL ,
[PermissionActive] tinyint NULL ,
[PermissionView] tinyint NULL ,
[PermissionEdit] tinyint NULL ,
[PermissionDelete] tinyint NULL 
)


GO

-- ----------------------------
-- Records of INVUserPermission
-- ----------------------------

-- ----------------------------
-- Table structure for [dbo].[INVVendor]
-- ----------------------------
DROP TABLE [dbo].[INVVendor]
GO
CREATE TABLE [dbo].[INVVendor] (
[VendorID] int NOT NULL IDENTITY(1,1) ,
[VendorCode] varchar(15) NOT NULL ,
[VendorName] varchar(100) NOT NULL ,
[VendorAddress] varchar(MAX) NOT NULL ,
[VendorTel] varchar(50) NULL ,
[VendorFax] varchar(50) NULL ,
[VendorEmail] varchar(50) NULL ,
[VendorWeb] varchar(50) NULL ,
[VendorContactName] varchar(100) NULL ,
[VendorContactAddress] varchar(MAX) NULL ,
[VendorContactTel] varchar(50) NULL ,
[VendorContactMobile] varchar(50) NULL ,
[VendorContactEmail] varchar(50) NULL ,
[Remarks] varchar(MAX) NULL ,
[Active] tinyint NULL ,
[VendorContactPhoto] image NULL 
)


GO

-- ----------------------------
-- Records of INVVendor
-- ----------------------------
SET IDENTITY_INSERT [dbo].[INVVendor] ON
GO
SET IDENTITY_INSERT [dbo].[INVVendor] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[SRVDelivery]
-- ----------------------------
DROP TABLE [dbo].[SRVDelivery]
GO
CREATE TABLE [dbo].[SRVDelivery] (
[DeliveryID] bigint NOT NULL IDENTITY(1,1) ,
[SerialIDs] nvarchar(64) NULL ,
[PartyID] bigint NULL ,
[SRVRegisID] bigint NULL ,
[BagCount] float(53) NULL ,
[KeepingCharge] float(53) NULL ,
[CarryingLoan] float(53) NULL ,
[EmptyBagLoan] float(53) NULL ,
[Remarks] nvarchar(MAX) NULL ,
[CreatedBy] uniqueidentifier NULL ,
[CreatedDate] datetime NULL ,
[ModifiedBy] uniqueidentifier NULL ,
[ModifiedDate] datetime NULL 
)


GO

-- ----------------------------
-- Records of SRVDelivery
-- ----------------------------
SET IDENTITY_INSERT [dbo].[SRVDelivery] ON
GO
SET IDENTITY_INSERT [dbo].[SRVDelivery] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[SRVLoanCollection]
-- ----------------------------
DROP TABLE [dbo].[SRVLoanCollection]
GO
CREATE TABLE [dbo].[SRVLoanCollection] (
[LCollectionID] bigint NOT NULL IDENTITY(1,1) ,
[SerialIDs] nvarchar(64) NULL ,
[LoanID] bigint NULL ,
[days] int NULL ,
[PartyID] bigint NULL ,
[TotalLoan] float(53) NULL ,
[InterestAmount] float(53) NULL ,
[Remarks] nvarchar(MAX) NULL ,
[CreatedBy] uniqueidentifier NULL ,
[CreatedDate] datetime NULL ,
[ModifiedBy] uniqueidentifier NULL ,
[ModifiedDate] datetime NULL 
)


GO
DBCC CHECKIDENT(N'[dbo].[SRVLoanCollection]', RESEED, 4)
GO

-- ----------------------------
-- Records of SRVLoanCollection
-- ----------------------------
SET IDENTITY_INSERT [dbo].[SRVLoanCollection] ON
GO
INSERT INTO [dbo].[SRVLoanCollection] ([LCollectionID], [SerialIDs], [LoanID], [days], [PartyID], [TotalLoan], [InterestAmount], [Remarks], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'1', N'4,', N'6', N'3', N'2', N'11181.68', N'20.18244', N'', N'00000000-0000-0000-0000-000000000000', N'2013-01-31 12:48:14.700', null, null);
GO
INSERT INTO [dbo].[SRVLoanCollection] ([LCollectionID], [SerialIDs], [LoanID], [days], [PartyID], [TotalLoan], [InterestAmount], [Remarks], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'3', N'8,', N'9', N'2', N'2', N'17885.54', N'21.53469', N'', N'00000000-0000-0000-0000-000000000000', N'2013-01-31 13:13:21.323', null, null);
GO
INSERT INTO [dbo].[SRVLoanCollection] ([LCollectionID], [SerialIDs], [LoanID], [days], [PartyID], [TotalLoan], [InterestAmount], [Remarks], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'4', N'13,', N'14', N'0', N'1', N'15625.75', N'0', N'', N'00000000-0000-0000-0000-000000000000', N'2013-01-31 20:52:28.800', null, null);
GO
SET IDENTITY_INSERT [dbo].[SRVLoanCollection] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[SRVLoanDisburse]
-- ----------------------------
DROP TABLE [dbo].[SRVLoanDisburse]
GO
CREATE TABLE [dbo].[SRVLoanDisburse] (
[LoanID] bigint NOT NULL IDENTITY(1,1) ,
[PartyID] bigint NULL ,
[LoanAmount] float(53) NULL ,
[Remarks] nvarchar(MAX) NULL ,
[CreatedBy] uniqueidentifier NULL ,
[CreatedDate] datetime NULL ,
[ModifiedBy] uniqueidentifier NULL ,
[ModifiedDate] datetime NULL ,
[caseID] int NULL ,
[serialIDs] nvarchar(MAX) NULL ,
[Bags] float(53) NULL 
)


GO
DBCC CHECKIDENT(N'[dbo].[SRVLoanDisburse]', RESEED, 15)
GO

-- ----------------------------
-- Records of SRVLoanDisburse
-- ----------------------------
SET IDENTITY_INSERT [dbo].[SRVLoanDisburse] ON
GO
INSERT INTO [dbo].[SRVLoanDisburse] ([LoanID], [PartyID], [LoanAmount], [Remarks], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate], [caseID], [serialIDs], [Bags]) VALUES (N'6', N'2', N'446.459991455078', N'', N'00000000-0000-0000-0000-000000000000', N'2013-01-28 16:46:52.347', null, null, N'200', N'1,4,5,', N'95');
GO
INSERT INTO [dbo].[SRVLoanDisburse] ([LoanID], [PartyID], [LoanAmount], [Remarks], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate], [caseID], [serialIDs], [Bags]) VALUES (N'9', N'2', N'446.600006103516', N'', N'00000000-0000-0000-0000-000000000000', N'2013-01-29 15:06:53.650', null, null, N'206', N'8,14,', N'60');
GO
INSERT INTO [dbo].[SRVLoanDisburse] ([LoanID], [PartyID], [LoanAmount], [Remarks], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate], [caseID], [serialIDs], [Bags]) VALUES (N'10', N'2', N'446.459991455078', N'', N'00000000-0000-0000-0000-000000000000', N'2013-01-30 10:18:46.613', null, null, N'209', N'6,', N'45');
GO
INSERT INTO [dbo].[SRVLoanDisburse] ([LoanID], [PartyID], [LoanAmount], [Remarks], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate], [caseID], [serialIDs], [Bags]) VALUES (N'11', N'8', N'445.230010986328', N'', N'00000000-0000-0000-0000-000000000000', N'2013-01-30 10:29:39.990', null, null, N'210', N'15,', N'100');
GO
INSERT INTO [dbo].[SRVLoanDisburse] ([LoanID], [PartyID], [LoanAmount], [Remarks], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate], [caseID], [serialIDs], [Bags]) VALUES (N'12', N'4', N'445.450012207031', N'loan to company', N'00000000-0000-0000-0000-000000000000', N'2013-01-31 14:16:20.910', null, null, N'211', N'9,10,', N'45');
GO
INSERT INTO [dbo].[SRVLoanDisburse] ([LoanID], [PartyID], [LoanAmount], [Remarks], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate], [caseID], [serialIDs], [Bags]) VALUES (N'13', N'1', N'446.450012207031', N'', N'00000000-0000-0000-0000-000000000000', N'2013-01-31 20:28:03.970', null, null, N'212', N'7,', N'1');
GO
INSERT INTO [dbo].[SRVLoanDisburse] ([LoanID], [PartyID], [LoanAmount], [Remarks], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate], [caseID], [serialIDs], [Bags]) VALUES (N'14', N'1', N'446.450012207031', N'', N'00000000-0000-0000-0000-000000000000', N'2013-01-31 20:49:04.573', null, null, N'213', N'13,', N'35');
GO
INSERT INTO [dbo].[SRVLoanDisburse] ([LoanID], [PartyID], [LoanAmount], [Remarks], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate], [caseID], [serialIDs], [Bags]) VALUES (N'15', N'4', N'500', N'', N'00000000-0000-0000-0000-000000000000', N'2013-02-02 19:08:46.377', null, null, N'214', N'11,12,', N'50');
GO
SET IDENTITY_INSERT [dbo].[SRVLoanDisburse] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[SRVRegistration]
-- ----------------------------
DROP TABLE [dbo].[SRVRegistration]
GO
CREATE TABLE [dbo].[SRVRegistration] (
[RegistrationID] bigint NOT NULL IDENTITY(1,1) ,
[SerialID] bigint NULL ,
[SerialNo] nvarchar(64) NULL ,
[PartyID] int NULL ,
[BagLoan] float(53) NULL ,
[CarryingLoan] float(53) NULL ,
[Remarks] nvarchar(MAX) NULL ,
[CreatedBy] uniqueidentifier NULL ,
[CreatedDate] datetime NULL ,
[ModifiedBy] uniqueidentifier NULL ,
[ModifiedDate] datetime NULL 
)


GO
DBCC CHECKIDENT(N'[dbo].[SRVRegistration]', RESEED, 34)
GO

-- ----------------------------
-- Records of SRVRegistration
-- ----------------------------
SET IDENTITY_INSERT [dbo].[SRVRegistration] ON
GO
INSERT INTO [dbo].[SRVRegistration] ([RegistrationID], [SerialID], [SerialNo], [PartyID], [BagLoan], [CarryingLoan], [Remarks], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'25', N'14', N'214/20', N'2', N'121', N'121', N'fsdfgh dg ', N'00000000-0000-0000-0000-000000000000', N'2013-01-28 15:29:50.263', null, null);
GO
INSERT INTO [dbo].[SRVRegistration] ([RegistrationID], [SerialID], [SerialNo], [PartyID], [BagLoan], [CarryingLoan], [Remarks], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'26', N'13', N'213/35', N'1', N'121', N'121', N'fsdfgh dg ', N'00000000-0000-0000-0000-000000000000', N'2013-01-28 15:30:49.543', null, null);
GO
INSERT INTO [dbo].[SRVRegistration] ([RegistrationID], [SerialID], [SerialNo], [PartyID], [BagLoan], [CarryingLoan], [Remarks], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'29', N'7', N'207/1', N'1', N'0', N'0', N'erwer ', N'00000000-0000-0000-0000-000000000000', N'2013-01-30 18:16:10.447', null, null);
GO
INSERT INTO [dbo].[SRVRegistration] ([RegistrationID], [SerialID], [SerialNo], [PartyID], [BagLoan], [CarryingLoan], [Remarks], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'30', N'18', N'218/20', N'8', N'100', N'1000', N'Testing', N'00000000-0000-0000-0000-000000000000', N'2013-01-31 15:30:24.390', null, null);
GO
INSERT INTO [dbo].[SRVRegistration] ([RegistrationID], [SerialID], [SerialNo], [PartyID], [BagLoan], [CarryingLoan], [Remarks], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'32', N'17', N'217/12', N'8', N'0', N'0', N'adsa', N'00000000-0000-0000-0000-000000000000', N'2013-02-02 17:13:40.340', null, null);
GO
INSERT INTO [dbo].[SRVRegistration] ([RegistrationID], [SerialID], [SerialNo], [PartyID], [BagLoan], [CarryingLoan], [Remarks], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'33', N'19', N'219/18', N'3', N'100', N'200', N'Test', N'00000000-0000-0000-0000-000000000000', N'2013-02-02 18:49:25.727', null, null);
GO
INSERT INTO [dbo].[SRVRegistration] ([RegistrationID], [SerialID], [SerialNo], [PartyID], [BagLoan], [CarryingLoan], [Remarks], [CreatedBy], [CreatedDate], [ModifiedBy], [ModifiedDate]) VALUES (N'34', N'8', N'208/40', N'2', N'100', N'1000', N'', N'00000000-0000-0000-0000-000000000000', N'2013-02-02 19:19:04.173', null, null);
GO
SET IDENTITY_INSERT [dbo].[SRVRegistration] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[sysdiagrams]
-- ----------------------------
DROP TABLE [dbo].[sysdiagrams]
GO
CREATE TABLE [dbo].[sysdiagrams] (
[name] sysname NOT NULL ,
[principal_id] int NOT NULL ,
[diagram_id] int NOT NULL IDENTITY(1,1) ,
[version] int NULL ,
[definition] varbinary(MAX) NULL 
)


GO

-- ----------------------------
-- Records of sysdiagrams
-- ----------------------------
SET IDENTITY_INSERT [dbo].[sysdiagrams] ON
GO
SET IDENTITY_INSERT [dbo].[sysdiagrams] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[SYSVariables]
-- ----------------------------
DROP TABLE [dbo].[SYSVariables]
GO
CREATE TABLE [dbo].[SYSVariables] (
[varID] bigint NOT NULL IDENTITY(1,1) ,
[VariableName] nvarchar(200) NULL ,
[variable] float(53) NULL ,
[ModifiedBy] uniqueidentifier NULL ,
[ModifiedDate] datetime NULL 
)


GO
DBCC CHECKIDENT(N'[dbo].[SYSVariables]', RESEED, 3)
GO

-- ----------------------------
-- Records of SYSVariables
-- ----------------------------
SET IDENTITY_INSERT [dbo].[SYSVariables] ON
GO
INSERT INTO [dbo].[SYSVariables] ([varID], [VariableName], [variable], [ModifiedBy], [ModifiedDate]) VALUES (N'1', N'interest percentage', N'18', null, null);
GO
INSERT INTO [dbo].[SYSVariables] ([varID], [VariableName], [variable], [ModifiedBy], [ModifiedDate]) VALUES (N'2', N'shed charge', N'4', null, null);
GO
INSERT INTO [dbo].[SYSVariables] ([varID], [VariableName], [variable], [ModifiedBy], [ModifiedDate]) VALUES (N'3', N'keeping charge', N'4', null, null);
GO
SET IDENTITY_INSERT [dbo].[SYSVariables] OFF
GO

-- ----------------------------
-- View structure for [dbo].[vw_aspnet_Applications]
-- ----------------------------
DROP VIEW [dbo].[vw_aspnet_Applications]
GO
CREATE VIEW [dbo].[vw_aspnet_Applications] AS 
SELECT [dbo].[aspnet_Applications].[ApplicationName], [dbo].[aspnet_Applications].[LoweredApplicationName], [dbo].[aspnet_Applications].[ApplicationId], [dbo].[aspnet_Applications].[Description]
  FROM [dbo].[aspnet_Applications]
GO

-- ----------------------------
-- View structure for [dbo].[vw_aspnet_MembershipUsers]
-- ----------------------------
DROP VIEW [dbo].[vw_aspnet_MembershipUsers]
GO
CREATE VIEW [dbo].[vw_aspnet_MembershipUsers] AS 
SELECT [dbo].[aspnet_Membership].[UserId],
            [dbo].[aspnet_Membership].[PasswordFormat],
            [dbo].[aspnet_Membership].[MobilePIN],
            [dbo].[aspnet_Membership].[Email],
            [dbo].[aspnet_Membership].[LoweredEmail],
            [dbo].[aspnet_Membership].[PasswordQuestion],
            [dbo].[aspnet_Membership].[PasswordAnswer],
            [dbo].[aspnet_Membership].[IsApproved],
            [dbo].[aspnet_Membership].[IsLockedOut],
            [dbo].[aspnet_Membership].[CreateDate],
            [dbo].[aspnet_Membership].[LastLoginDate],
            [dbo].[aspnet_Membership].[LastPasswordChangedDate],
            [dbo].[aspnet_Membership].[LastLockoutDate],
            [dbo].[aspnet_Membership].[FailedPasswordAttemptCount],
            [dbo].[aspnet_Membership].[FailedPasswordAttemptWindowStart],
            [dbo].[aspnet_Membership].[FailedPasswordAnswerAttemptCount],
            [dbo].[aspnet_Membership].[FailedPasswordAnswerAttemptWindowStart],
            [dbo].[aspnet_Membership].[Comment],
            [dbo].[aspnet_Users].[ApplicationId],
            [dbo].[aspnet_Users].[UserName],
            [dbo].[aspnet_Users].[MobileAlias],
            [dbo].[aspnet_Users].[IsAnonymous],
            [dbo].[aspnet_Users].[LastActivityDate]
  FROM [dbo].[aspnet_Membership] INNER JOIN [dbo].[aspnet_Users]
      ON [dbo].[aspnet_Membership].[UserId] = [dbo].[aspnet_Users].[UserId]
GO

-- ----------------------------
-- View structure for [dbo].[vw_aspnet_Profiles]
-- ----------------------------
DROP VIEW [dbo].[vw_aspnet_Profiles]
GO
CREATE VIEW [dbo].[vw_aspnet_Profiles] AS 
SELECT [dbo].[aspnet_Profile].[UserId], [dbo].[aspnet_Profile].[LastUpdatedDate],
      [DataSize]=  DATALENGTH([dbo].[aspnet_Profile].[PropertyNames])
                 + DATALENGTH([dbo].[aspnet_Profile].[PropertyValuesString])
                 + DATALENGTH([dbo].[aspnet_Profile].[PropertyValuesBinary])
  FROM [dbo].[aspnet_Profile]
GO

-- ----------------------------
-- View structure for [dbo].[vw_aspnet_Roles]
-- ----------------------------
DROP VIEW [dbo].[vw_aspnet_Roles]
GO
CREATE VIEW [dbo].[vw_aspnet_Roles] AS 
SELECT [dbo].[aspnet_Roles].[ApplicationId], [dbo].[aspnet_Roles].[RoleId], [dbo].[aspnet_Roles].[RoleName], [dbo].[aspnet_Roles].[LoweredRoleName], [dbo].[aspnet_Roles].[Description]
  FROM [dbo].[aspnet_Roles]
GO

-- ----------------------------
-- View structure for [dbo].[vw_aspnet_Users]
-- ----------------------------
DROP VIEW [dbo].[vw_aspnet_Users]
GO
CREATE VIEW [dbo].[vw_aspnet_Users] AS 
SELECT [dbo].[aspnet_Users].[ApplicationId], [dbo].[aspnet_Users].[UserId], [dbo].[aspnet_Users].[UserName], [dbo].[aspnet_Users].[LoweredUserName], [dbo].[aspnet_Users].[MobileAlias], [dbo].[aspnet_Users].[IsAnonymous], [dbo].[aspnet_Users].[LastActivityDate]
  FROM [dbo].[aspnet_Users]
GO

-- ----------------------------
-- View structure for [dbo].[vw_aspnet_UsersInRoles]
-- ----------------------------
DROP VIEW [dbo].[vw_aspnet_UsersInRoles]
GO
CREATE VIEW [dbo].[vw_aspnet_UsersInRoles] AS 
SELECT [dbo].[aspnet_UsersInRoles].[UserId], [dbo].[aspnet_UsersInRoles].[RoleId]
  FROM [dbo].[aspnet_UsersInRoles]
GO

-- ----------------------------
-- View structure for [dbo].[vw_aspnet_WebPartState_Paths]
-- ----------------------------
DROP VIEW [dbo].[vw_aspnet_WebPartState_Paths]
GO
CREATE VIEW [dbo].[vw_aspnet_WebPartState_Paths] AS 
SELECT [dbo].[aspnet_Paths].[ApplicationId], [dbo].[aspnet_Paths].[PathId], [dbo].[aspnet_Paths].[Path], [dbo].[aspnet_Paths].[LoweredPath]
  FROM [dbo].[aspnet_Paths]
GO

-- ----------------------------
-- View structure for [dbo].[vw_aspnet_WebPartState_Shared]
-- ----------------------------
DROP VIEW [dbo].[vw_aspnet_WebPartState_Shared]
GO
CREATE VIEW [dbo].[vw_aspnet_WebPartState_Shared] AS 
SELECT [dbo].[aspnet_PersonalizationAllUsers].[PathId], [DataSize]=DATALENGTH([dbo].[aspnet_PersonalizationAllUsers].[PageSettings]), [dbo].[aspnet_PersonalizationAllUsers].[LastUpdatedDate]
  FROM [dbo].[aspnet_PersonalizationAllUsers]
GO

-- ----------------------------
-- View structure for [dbo].[vw_aspnet_WebPartState_User]
-- ----------------------------
DROP VIEW [dbo].[vw_aspnet_WebPartState_User]
GO
CREATE VIEW [dbo].[vw_aspnet_WebPartState_User] AS 
SELECT [dbo].[aspnet_PersonalizationPerUser].[PathId], [dbo].[aspnet_PersonalizationPerUser].[UserId], [DataSize]=DATALENGTH([dbo].[aspnet_PersonalizationPerUser].[PageSettings]), [dbo].[aspnet_PersonalizationPerUser].[LastUpdatedDate]
  FROM [dbo].[aspnet_PersonalizationPerUser]
GO

-- ----------------------------
-- Procedure structure for [dbo].[aspnet_AnyDataInTables]
-- ----------------------------
DROP PROCEDURE [dbo].[aspnet_AnyDataInTables]
GO
CREATE PROCEDURE [dbo].[aspnet_AnyDataInTables]
    @TablesToCheck int
AS
BEGIN
    -- Check Membership table if (@TablesToCheck & 1) is set
    IF ((@TablesToCheck & 1) <> 0 AND
        (EXISTS (SELECT name FROM sysobjects WHERE (name = N'vw_aspnet_MembershipUsers') AND (type = 'V'))))
    BEGIN
        IF (EXISTS(SELECT TOP 1 UserId FROM dbo.aspnet_Membership))
        BEGIN
            SELECT N'aspnet_Membership'
            RETURN
        END
    END

    -- Check aspnet_Roles table if (@TablesToCheck & 2) is set
    IF ((@TablesToCheck & 2) <> 0  AND
        (EXISTS (SELECT name FROM sysobjects WHERE (name = N'vw_aspnet_Roles') AND (type = 'V'))) )
    BEGIN
        IF (EXISTS(SELECT TOP 1 RoleId FROM dbo.aspnet_Roles))
        BEGIN
            SELECT N'aspnet_Roles'
            RETURN
        END
    END

    -- Check aspnet_Profile table if (@TablesToCheck & 4) is set
    IF ((@TablesToCheck & 4) <> 0  AND
        (EXISTS (SELECT name FROM sysobjects WHERE (name = N'vw_aspnet_Profiles') AND (type = 'V'))) )
    BEGIN
        IF (EXISTS(SELECT TOP 1 UserId FROM dbo.aspnet_Profile))
        BEGIN
            SELECT N'aspnet_Profile'
            RETURN
        END
    END

    -- Check aspnet_PersonalizationPerUser table if (@TablesToCheck & 8) is set
    IF ((@TablesToCheck & 8) <> 0  AND
        (EXISTS (SELECT name FROM sysobjects WHERE (name = N'vw_aspnet_WebPartState_User') AND (type = 'V'))) )
    BEGIN
        IF (EXISTS(SELECT TOP 1 UserId FROM dbo.aspnet_PersonalizationPerUser))
        BEGIN
            SELECT N'aspnet_PersonalizationPerUser'
            RETURN
        END
    END

    -- Check aspnet_PersonalizationPerUser table if (@TablesToCheck & 16) is set
    IF ((@TablesToCheck & 16) <> 0  AND
        (EXISTS (SELECT name FROM sysobjects WHERE (name = N'aspnet_WebEvent_LogEvent') AND (type = 'P'))) )
    BEGIN
        IF (EXISTS(SELECT TOP 1 * FROM dbo.aspnet_WebEvent_Events))
        BEGIN
            SELECT N'aspnet_WebEvent_Events'
            RETURN
        END
    END

    -- Check aspnet_Users table if (@TablesToCheck & 1,2,4 & 8) are all set
    IF ((@TablesToCheck & 1) <> 0 AND
        (@TablesToCheck & 2) <> 0 AND
        (@TablesToCheck & 4) <> 0 AND
        (@TablesToCheck & 8) <> 0 AND
        (@TablesToCheck & 32) <> 0 AND
        (@TablesToCheck & 128) <> 0 AND
        (@TablesToCheck & 256) <> 0 AND
        (@TablesToCheck & 512) <> 0 AND
        (@TablesToCheck & 1024) <> 0)
    BEGIN
        IF (EXISTS(SELECT TOP 1 UserId FROM dbo.aspnet_Users))
        BEGIN
            SELECT N'aspnet_Users'
            RETURN
        END
        IF (EXISTS(SELECT TOP 1 ApplicationId FROM dbo.aspnet_Applications))
        BEGIN
            SELECT N'aspnet_Applications'
            RETURN
        END
    END
END
GO

-- ----------------------------
-- Procedure structure for [dbo].[aspnet_Applications_CreateApplication]
-- ----------------------------
DROP PROCEDURE [dbo].[aspnet_Applications_CreateApplication]
GO

CREATE PROCEDURE [dbo].[aspnet_Applications_CreateApplication]
    @ApplicationName      nvarchar(256),
    @ApplicationId        uniqueidentifier OUTPUT
AS
BEGIN
    SELECT  @ApplicationId = ApplicationId FROM dbo.aspnet_Applications WHERE LOWER(@ApplicationName) = LoweredApplicationName

    IF(@ApplicationId IS NULL)
    BEGIN
        DECLARE @TranStarted   bit
        SET @TranStarted = 0

        IF( @@TRANCOUNT = 0 )
        BEGIN
	        BEGIN TRANSACTION
	        SET @TranStarted = 1
        END
        ELSE
    	    SET @TranStarted = 0

        SELECT  @ApplicationId = ApplicationId
        FROM dbo.aspnet_Applications WITH (UPDLOCK, HOLDLOCK)
        WHERE LOWER(@ApplicationName) = LoweredApplicationName

        IF(@ApplicationId IS NULL)
        BEGIN
            SELECT  @ApplicationId = NEWID()
            INSERT  dbo.aspnet_Applications (ApplicationId, ApplicationName, LoweredApplicationName)
            VALUES  (@ApplicationId, @ApplicationName, LOWER(@ApplicationName))
        END


        IF( @TranStarted = 1 )
        BEGIN
            IF(@@ERROR = 0)
            BEGIN
	        SET @TranStarted = 0
	        COMMIT TRANSACTION
            END
            ELSE
            BEGIN
                SET @TranStarted = 0
                ROLLBACK TRANSACTION
            END
        END
    END
END
GO

-- ----------------------------
-- Procedure structure for [dbo].[aspnet_CheckSchemaVersion]
-- ----------------------------
DROP PROCEDURE [dbo].[aspnet_CheckSchemaVersion]
GO

CREATE PROCEDURE [dbo].[aspnet_CheckSchemaVersion]
    @Feature                   nvarchar(128),
    @CompatibleSchemaVersion   nvarchar(128)
AS
BEGIN
    IF (EXISTS( SELECT  *
                FROM    dbo.aspnet_SchemaVersions
                WHERE   Feature = LOWER( @Feature ) AND
                        CompatibleSchemaVersion = @CompatibleSchemaVersion ))
        RETURN 0

    RETURN 1
END
GO

-- ----------------------------
-- Procedure structure for [dbo].[aspnet_Membership_ChangePasswordQuestionAndAnswer]
-- ----------------------------
DROP PROCEDURE [dbo].[aspnet_Membership_ChangePasswordQuestionAndAnswer]
GO
CREATE PROCEDURE [dbo].[aspnet_Membership_ChangePasswordQuestionAndAnswer]
    @ApplicationName       nvarchar(256),
    @UserName              nvarchar(256),
    @NewPasswordQuestion   nvarchar(256),
    @NewPasswordAnswer     nvarchar(128)
AS
BEGIN
    DECLARE @UserId uniqueidentifier
    SELECT  @UserId = NULL
    SELECT  @UserId = u.UserId
    FROM    dbo.aspnet_Membership m, dbo.aspnet_Users u, dbo.aspnet_Applications a
    WHERE   LoweredUserName = LOWER(@UserName) AND
            u.ApplicationId = a.ApplicationId  AND
            LOWER(@ApplicationName) = a.LoweredApplicationName AND
            u.UserId = m.UserId
    IF (@UserId IS NULL)
    BEGIN
        RETURN(1)
    END

    UPDATE dbo.aspnet_Membership
    SET    PasswordQuestion = @NewPasswordQuestion, PasswordAnswer = @NewPasswordAnswer
    WHERE  UserId=@UserId
    RETURN(0)
END
GO

-- ----------------------------
-- Procedure structure for [dbo].[aspnet_Membership_CreateUser]
-- ----------------------------
DROP PROCEDURE [dbo].[aspnet_Membership_CreateUser]
GO
CREATE PROCEDURE [dbo].[aspnet_Membership_CreateUser]
    @ApplicationName                        nvarchar(256),
    @UserName                               nvarchar(256),
    @Password                               nvarchar(128),
    @PasswordSalt                           nvarchar(128),
    @Email                                  nvarchar(256),
    @PasswordQuestion                       nvarchar(256),
    @PasswordAnswer                         nvarchar(128),
    @IsApproved                             bit,
    @CurrentTimeUtc                         datetime,
    @CreateDate                             datetime = NULL,
    @UniqueEmail                            int      = 0,
    @PasswordFormat                         int      = 0,
    @UserId                                 uniqueidentifier OUTPUT
AS
BEGIN
    DECLARE @ApplicationId uniqueidentifier
    SELECT  @ApplicationId = NULL

    DECLARE @NewUserId uniqueidentifier
    SELECT @NewUserId = NULL

    DECLARE @IsLockedOut bit
    SET @IsLockedOut = 0

    DECLARE @LastLockoutDate  datetime
    SET @LastLockoutDate = CONVERT( datetime, '17540101', 112 )

    DECLARE @FailedPasswordAttemptCount int
    SET @FailedPasswordAttemptCount = 0

    DECLARE @FailedPasswordAttemptWindowStart  datetime
    SET @FailedPasswordAttemptWindowStart = CONVERT( datetime, '17540101', 112 )

    DECLARE @FailedPasswordAnswerAttemptCount int
    SET @FailedPasswordAnswerAttemptCount = 0

    DECLARE @FailedPasswordAnswerAttemptWindowStart  datetime
    SET @FailedPasswordAnswerAttemptWindowStart = CONVERT( datetime, '17540101', 112 )

    DECLARE @NewUserCreated bit
    DECLARE @ReturnValue   int
    SET @ReturnValue = 0

    DECLARE @ErrorCode     int
    SET @ErrorCode = 0

    DECLARE @TranStarted   bit
    SET @TranStarted = 0

    IF( @@TRANCOUNT = 0 )
    BEGIN
	    BEGIN TRANSACTION
	    SET @TranStarted = 1
    END
    ELSE
    	SET @TranStarted = 0

    EXEC dbo.aspnet_Applications_CreateApplication @ApplicationName, @ApplicationId OUTPUT

    IF( @@ERROR <> 0 )
    BEGIN
        SET @ErrorCode = -1
        GOTO Cleanup
    END

    SET @CreateDate = @CurrentTimeUtc

    SELECT  @NewUserId = UserId FROM dbo.aspnet_Users WHERE LOWER(@UserName) = LoweredUserName AND @ApplicationId = ApplicationId
    IF ( @NewUserId IS NULL )
    BEGIN
        SET @NewUserId = @UserId
        EXEC @ReturnValue = dbo.aspnet_Users_CreateUser @ApplicationId, @UserName, 0, @CreateDate, @NewUserId OUTPUT
        SET @NewUserCreated = 1
    END
    ELSE
    BEGIN
        SET @NewUserCreated = 0
        IF( @NewUserId <> @UserId AND @UserId IS NOT NULL )
        BEGIN
            SET @ErrorCode = 6
            GOTO Cleanup
        END
    END

    IF( @@ERROR <> 0 )
    BEGIN
        SET @ErrorCode = -1
        GOTO Cleanup
    END

    IF( @ReturnValue = -1 )
    BEGIN
        SET @ErrorCode = 10
        GOTO Cleanup
    END

    IF ( EXISTS ( SELECT UserId
                  FROM   dbo.aspnet_Membership
                  WHERE  @NewUserId = UserId ) )
    BEGIN
        SET @ErrorCode = 6
        GOTO Cleanup
    END

    SET @UserId = @NewUserId

    IF (@UniqueEmail = 1)
    BEGIN
        IF (EXISTS (SELECT *
                    FROM  dbo.aspnet_Membership m WITH ( UPDLOCK, HOLDLOCK )
                    WHERE ApplicationId = @ApplicationId AND LoweredEmail = LOWER(@Email)))
        BEGIN
            SET @ErrorCode = 7
            GOTO Cleanup
        END
    END

    IF (@NewUserCreated = 0)
    BEGIN
        UPDATE dbo.aspnet_Users
        SET    LastActivityDate = @CreateDate
        WHERE  @UserId = UserId
        IF( @@ERROR <> 0 )
        BEGIN
            SET @ErrorCode = -1
            GOTO Cleanup
        END
    END

    INSERT INTO dbo.aspnet_Membership
                ( ApplicationId,
                  UserId,
                  Password,
                  PasswordSalt,
                  Email,
                  LoweredEmail,
                  PasswordQuestion,
                  PasswordAnswer,
                  PasswordFormat,
                  IsApproved,
                  IsLockedOut,
                  CreateDate,
                  LastLoginDate,
                  LastPasswordChangedDate,
                  LastLockoutDate,
                  FailedPasswordAttemptCount,
                  FailedPasswordAttemptWindowStart,
                  FailedPasswordAnswerAttemptCount,
                  FailedPasswordAnswerAttemptWindowStart )
         VALUES ( @ApplicationId,
                  @UserId,
                  @Password,
                  @PasswordSalt,
                  @Email,
                  LOWER(@Email),
                  @PasswordQuestion,
                  @PasswordAnswer,
                  @PasswordFormat,
                  @IsApproved,
                  @IsLockedOut,
                  @CreateDate,
                  @CreateDate,
                  @CreateDate,
                  @LastLockoutDate,
                  @FailedPasswordAttemptCount,
                  @FailedPasswordAttemptWindowStart,
                  @FailedPasswordAnswerAttemptCount,
                  @FailedPasswordAnswerAttemptWindowStart )

    IF( @@ERROR <> 0 )
    BEGIN
        SET @ErrorCode = -1
        GOTO Cleanup
    END

    IF( @TranStarted = 1 )
    BEGIN
	    SET @TranStarted = 0
	    COMMIT TRANSACTION
    END

    RETURN 0

Cleanup:

    IF( @TranStarted = 1 )
    BEGIN
        SET @TranStarted = 0
    	ROLLBACK TRANSACTION
    END

    RETURN @ErrorCode

END
GO

-- ----------------------------
-- Procedure structure for [dbo].[aspnet_Membership_FindUsersByEmail]
-- ----------------------------
DROP PROCEDURE [dbo].[aspnet_Membership_FindUsersByEmail]
GO
CREATE PROCEDURE [dbo].[aspnet_Membership_FindUsersByEmail]
    @ApplicationName       nvarchar(256),
    @EmailToMatch          nvarchar(256),
    @PageIndex             int,
    @PageSize              int
AS
BEGIN
    DECLARE @ApplicationId uniqueidentifier
    SELECT  @ApplicationId = NULL
    SELECT  @ApplicationId = ApplicationId FROM dbo.aspnet_Applications WHERE LOWER(@ApplicationName) = LoweredApplicationName
    IF (@ApplicationId IS NULL)
        RETURN 0

    -- Set the page bounds
    DECLARE @PageLowerBound int
    DECLARE @PageUpperBound int
    DECLARE @TotalRecords   int
    SET @PageLowerBound = @PageSize * @PageIndex
    SET @PageUpperBound = @PageSize - 1 + @PageLowerBound

    -- Create a temp table TO store the select results
    CREATE TABLE #PageIndexForUsers
    (
        IndexId int IDENTITY (0, 1) NOT NULL,
        UserId uniqueidentifier
    )

    -- Insert into our temp table
    IF( @EmailToMatch IS NULL )
        INSERT INTO #PageIndexForUsers (UserId)
            SELECT u.UserId
            FROM   dbo.aspnet_Users u, dbo.aspnet_Membership m
            WHERE  u.ApplicationId = @ApplicationId AND m.UserId = u.UserId AND m.Email IS NULL
            ORDER BY m.LoweredEmail
    ELSE
        INSERT INTO #PageIndexForUsers (UserId)
            SELECT u.UserId
            FROM   dbo.aspnet_Users u, dbo.aspnet_Membership m
            WHERE  u.ApplicationId = @ApplicationId AND m.UserId = u.UserId AND m.LoweredEmail LIKE LOWER(@EmailToMatch)
            ORDER BY m.LoweredEmail

    SELECT  u.UserName, m.Email, m.PasswordQuestion, m.Comment, m.IsApproved,
            m.CreateDate,
            m.LastLoginDate,
            u.LastActivityDate,
            m.LastPasswordChangedDate,
            u.UserId, m.IsLockedOut,
            m.LastLockoutDate
    FROM   dbo.aspnet_Membership m, dbo.aspnet_Users u, #PageIndexForUsers p
    WHERE  u.UserId = p.UserId AND u.UserId = m.UserId AND
           p.IndexId >= @PageLowerBound AND p.IndexId <= @PageUpperBound
    ORDER BY m.LoweredEmail

    SELECT  @TotalRecords = COUNT(*)
    FROM    #PageIndexForUsers
    RETURN @TotalRecords
END
GO

-- ----------------------------
-- Procedure structure for [dbo].[aspnet_Membership_FindUsersByName]
-- ----------------------------
DROP PROCEDURE [dbo].[aspnet_Membership_FindUsersByName]
GO
CREATE PROCEDURE [dbo].[aspnet_Membership_FindUsersByName]
    @ApplicationName       nvarchar(256),
    @UserNameToMatch       nvarchar(256),
    @PageIndex             int,
    @PageSize              int
AS
BEGIN
    DECLARE @ApplicationId uniqueidentifier
    SELECT  @ApplicationId = NULL
    SELECT  @ApplicationId = ApplicationId FROM dbo.aspnet_Applications WHERE LOWER(@ApplicationName) = LoweredApplicationName
    IF (@ApplicationId IS NULL)
        RETURN 0

    -- Set the page bounds
    DECLARE @PageLowerBound int
    DECLARE @PageUpperBound int
    DECLARE @TotalRecords   int
    SET @PageLowerBound = @PageSize * @PageIndex
    SET @PageUpperBound = @PageSize - 1 + @PageLowerBound

    -- Create a temp table TO store the select results
    CREATE TABLE #PageIndexForUsers
    (
        IndexId int IDENTITY (0, 1) NOT NULL,
        UserId uniqueidentifier
    )

    -- Insert into our temp table
    INSERT INTO #PageIndexForUsers (UserId)
        SELECT u.UserId
        FROM   dbo.aspnet_Users u, dbo.aspnet_Membership m
        WHERE  u.ApplicationId = @ApplicationId AND m.UserId = u.UserId AND u.LoweredUserName LIKE LOWER(@UserNameToMatch)
        ORDER BY u.UserName


    SELECT  u.UserName, m.Email, m.PasswordQuestion, m.Comment, m.IsApproved,
            m.CreateDate,
            m.LastLoginDate,
            u.LastActivityDate,
            m.LastPasswordChangedDate,
            u.UserId, m.IsLockedOut,
            m.LastLockoutDate
    FROM   dbo.aspnet_Membership m, dbo.aspnet_Users u, #PageIndexForUsers p
    WHERE  u.UserId = p.UserId AND u.UserId = m.UserId AND
           p.IndexId >= @PageLowerBound AND p.IndexId <= @PageUpperBound
    ORDER BY u.UserName

    SELECT  @TotalRecords = COUNT(*)
    FROM    #PageIndexForUsers
    RETURN @TotalRecords
END
GO

-- ----------------------------
-- Procedure structure for [dbo].[aspnet_Membership_GetAllUsers]
-- ----------------------------
DROP PROCEDURE [dbo].[aspnet_Membership_GetAllUsers]
GO
CREATE PROCEDURE [dbo].[aspnet_Membership_GetAllUsers]
    @ApplicationName       nvarchar(256),
    @PageIndex             int,
    @PageSize              int
AS
BEGIN
    DECLARE @ApplicationId uniqueidentifier
    SELECT  @ApplicationId = NULL
    SELECT  @ApplicationId = ApplicationId FROM dbo.aspnet_Applications WHERE LOWER(@ApplicationName) = LoweredApplicationName
    IF (@ApplicationId IS NULL)
        RETURN 0


    -- Set the page bounds
    DECLARE @PageLowerBound int
    DECLARE @PageUpperBound int
    DECLARE @TotalRecords   int
    SET @PageLowerBound = @PageSize * @PageIndex
    SET @PageUpperBound = @PageSize - 1 + @PageLowerBound

    -- Create a temp table TO store the select results
    CREATE TABLE #PageIndexForUsers
    (
        IndexId int IDENTITY (0, 1) NOT NULL,
        UserId uniqueidentifier
    )

    -- Insert into our temp table
    INSERT INTO #PageIndexForUsers (UserId)
    SELECT u.UserId
    FROM   dbo.aspnet_Membership m, dbo.aspnet_Users u
    WHERE  u.ApplicationId = @ApplicationId AND u.UserId = m.UserId
    ORDER BY u.UserName

    SELECT @TotalRecords = @@ROWCOUNT

    SELECT u.UserName, m.Email, m.PasswordQuestion, m.Comment, m.IsApproved,
            m.CreateDate,
            m.LastLoginDate,
            u.LastActivityDate,
            m.LastPasswordChangedDate,
            u.UserId, m.IsLockedOut,
            m.LastLockoutDate
    FROM   dbo.aspnet_Membership m, dbo.aspnet_Users u, #PageIndexForUsers p
    WHERE  u.UserId = p.UserId AND u.UserId = m.UserId AND
           p.IndexId >= @PageLowerBound AND p.IndexId <= @PageUpperBound
    ORDER BY u.UserName
    RETURN @TotalRecords
END
GO

-- ----------------------------
-- Procedure structure for [dbo].[aspnet_Membership_GetNumberOfUsersOnline]
-- ----------------------------
DROP PROCEDURE [dbo].[aspnet_Membership_GetNumberOfUsersOnline]
GO
CREATE PROCEDURE [dbo].[aspnet_Membership_GetNumberOfUsersOnline]
    @ApplicationName            nvarchar(256),
    @MinutesSinceLastInActive   int,
    @CurrentTimeUtc             datetime
AS
BEGIN
    DECLARE @DateActive datetime
    SELECT  @DateActive = DATEADD(minute,  -(@MinutesSinceLastInActive), @CurrentTimeUtc)

    DECLARE @NumOnline int
    SELECT  @NumOnline = COUNT(*)
    FROM    dbo.aspnet_Users u(NOLOCK),
            dbo.aspnet_Applications a(NOLOCK),
            dbo.aspnet_Membership m(NOLOCK)
    WHERE   u.ApplicationId = a.ApplicationId                  AND
            LastActivityDate > @DateActive                     AND
            a.LoweredApplicationName = LOWER(@ApplicationName) AND
            u.UserId = m.UserId
    RETURN(@NumOnline)
END
GO

-- ----------------------------
-- Procedure structure for [dbo].[aspnet_Membership_GetPassword]
-- ----------------------------
DROP PROCEDURE [dbo].[aspnet_Membership_GetPassword]
GO
CREATE PROCEDURE [dbo].[aspnet_Membership_GetPassword]
    @ApplicationName                nvarchar(256),
    @UserName                       nvarchar(256),
    @MaxInvalidPasswordAttempts     int,
    @PasswordAttemptWindow          int,
    @CurrentTimeUtc                 datetime,
    @PasswordAnswer                 nvarchar(128) = NULL
AS
BEGIN
    DECLARE @UserId                                 uniqueidentifier
    DECLARE @PasswordFormat                         int
    DECLARE @Password                               nvarchar(128)
    DECLARE @passAns                                nvarchar(128)
    DECLARE @IsLockedOut                            bit
    DECLARE @LastLockoutDate                        datetime
    DECLARE @FailedPasswordAttemptCount             int
    DECLARE @FailedPasswordAttemptWindowStart       datetime
    DECLARE @FailedPasswordAnswerAttemptCount       int
    DECLARE @FailedPasswordAnswerAttemptWindowStart datetime

    DECLARE @ErrorCode     int
    SET @ErrorCode = 0

    DECLARE @TranStarted   bit
    SET @TranStarted = 0

    IF( @@TRANCOUNT = 0 )
    BEGIN
	    BEGIN TRANSACTION
	    SET @TranStarted = 1
    END
    ELSE
    	SET @TranStarted = 0

    SELECT  @UserId = u.UserId,
            @Password = m.Password,
            @passAns = m.PasswordAnswer,
            @PasswordFormat = m.PasswordFormat,
            @IsLockedOut = m.IsLockedOut,
            @LastLockoutDate = m.LastLockoutDate,
            @FailedPasswordAttemptCount = m.FailedPasswordAttemptCount,
            @FailedPasswordAttemptWindowStart = m.FailedPasswordAttemptWindowStart,
            @FailedPasswordAnswerAttemptCount = m.FailedPasswordAnswerAttemptCount,
            @FailedPasswordAnswerAttemptWindowStart = m.FailedPasswordAnswerAttemptWindowStart
    FROM    dbo.aspnet_Applications a, dbo.aspnet_Users u, dbo.aspnet_Membership m WITH ( UPDLOCK )
    WHERE   LOWER(@ApplicationName) = a.LoweredApplicationName AND
            u.ApplicationId = a.ApplicationId    AND
            u.UserId = m.UserId AND
            LOWER(@UserName) = u.LoweredUserName

    IF ( @@rowcount = 0 )
    BEGIN
        SET @ErrorCode = 1
        GOTO Cleanup
    END

    IF( @IsLockedOut = 1 )
    BEGIN
        SET @ErrorCode = 99
        GOTO Cleanup
    END

    IF ( NOT( @PasswordAnswer IS NULL ) )
    BEGIN
        IF( ( @passAns IS NULL ) OR ( LOWER( @passAns ) <> LOWER( @PasswordAnswer ) ) )
        BEGIN
            IF( @CurrentTimeUtc > DATEADD( minute, @PasswordAttemptWindow, @FailedPasswordAnswerAttemptWindowStart ) )
            BEGIN
                SET @FailedPasswordAnswerAttemptWindowStart = @CurrentTimeUtc
                SET @FailedPasswordAnswerAttemptCount = 1
            END
            ELSE
            BEGIN
                SET @FailedPasswordAnswerAttemptCount = @FailedPasswordAnswerAttemptCount + 1
                SET @FailedPasswordAnswerAttemptWindowStart = @CurrentTimeUtc
            END

            BEGIN
                IF( @FailedPasswordAnswerAttemptCount >= @MaxInvalidPasswordAttempts )
                BEGIN
                    SET @IsLockedOut = 1
                    SET @LastLockoutDate = @CurrentTimeUtc
                END
            END

            SET @ErrorCode = 3
        END
        ELSE
        BEGIN
            IF( @FailedPasswordAnswerAttemptCount > 0 )
            BEGIN
                SET @FailedPasswordAnswerAttemptCount = 0
                SET @FailedPasswordAnswerAttemptWindowStart = CONVERT( datetime, '17540101', 112 )
            END
        END

        UPDATE dbo.aspnet_Membership
        SET IsLockedOut = @IsLockedOut, LastLockoutDate = @LastLockoutDate,
            FailedPasswordAttemptCount = @FailedPasswordAttemptCount,
            FailedPasswordAttemptWindowStart = @FailedPasswordAttemptWindowStart,
            FailedPasswordAnswerAttemptCount = @FailedPasswordAnswerAttemptCount,
            FailedPasswordAnswerAttemptWindowStart = @FailedPasswordAnswerAttemptWindowStart
        WHERE @UserId = UserId

        IF( @@ERROR <> 0 )
        BEGIN
            SET @ErrorCode = -1
            GOTO Cleanup
        END
    END

    IF( @TranStarted = 1 )
    BEGIN
	SET @TranStarted = 0
	COMMIT TRANSACTION
    END

    IF( @ErrorCode = 0 )
        SELECT @Password, @PasswordFormat

    RETURN @ErrorCode

Cleanup:

    IF( @TranStarted = 1 )
    BEGIN
        SET @TranStarted = 0
    	ROLLBACK TRANSACTION
    END

    RETURN @ErrorCode

END
GO

-- ----------------------------
-- Procedure structure for [dbo].[aspnet_Membership_GetPasswordWithFormat]
-- ----------------------------
DROP PROCEDURE [dbo].[aspnet_Membership_GetPasswordWithFormat]
GO
CREATE PROCEDURE [dbo].[aspnet_Membership_GetPasswordWithFormat]
    @ApplicationName                nvarchar(256),
    @UserName                       nvarchar(256),
    @UpdateLastLoginActivityDate    bit,
    @CurrentTimeUtc                 datetime
AS
BEGIN
    DECLARE @IsLockedOut                        bit
    DECLARE @UserId                             uniqueidentifier
    DECLARE @Password                           nvarchar(128)
    DECLARE @PasswordSalt                       nvarchar(128)
    DECLARE @PasswordFormat                     int
    DECLARE @FailedPasswordAttemptCount         int
    DECLARE @FailedPasswordAnswerAttemptCount   int
    DECLARE @IsApproved                         bit
    DECLARE @LastActivityDate                   datetime
    DECLARE @LastLoginDate                      datetime

    SELECT  @UserId          = NULL

    SELECT  @UserId = u.UserId, @IsLockedOut = m.IsLockedOut, @Password=Password, @PasswordFormat=PasswordFormat,
            @PasswordSalt=PasswordSalt, @FailedPasswordAttemptCount=FailedPasswordAttemptCount,
		    @FailedPasswordAnswerAttemptCount=FailedPasswordAnswerAttemptCount, @IsApproved=IsApproved,
            @LastActivityDate = LastActivityDate, @LastLoginDate = LastLoginDate
    FROM    dbo.aspnet_Applications a, dbo.aspnet_Users u, dbo.aspnet_Membership m
    WHERE   LOWER(@ApplicationName) = a.LoweredApplicationName AND
            u.ApplicationId = a.ApplicationId    AND
            u.UserId = m.UserId AND
            LOWER(@UserName) = u.LoweredUserName

    IF (@UserId IS NULL)
        RETURN 1

    IF (@IsLockedOut = 1)
        RETURN 99

    SELECT   @Password, @PasswordFormat, @PasswordSalt, @FailedPasswordAttemptCount,
             @FailedPasswordAnswerAttemptCount, @IsApproved, @LastLoginDate, @LastActivityDate

    IF (@UpdateLastLoginActivityDate = 1 AND @IsApproved = 1)
    BEGIN
        UPDATE  dbo.aspnet_Membership
        SET     LastLoginDate = @CurrentTimeUtc
        WHERE   UserId = @UserId

        UPDATE  dbo.aspnet_Users
        SET     LastActivityDate = @CurrentTimeUtc
        WHERE   @UserId = UserId
    END


    RETURN 0
END
GO

-- ----------------------------
-- Procedure structure for [dbo].[aspnet_Membership_GetUserByEmail]
-- ----------------------------
DROP PROCEDURE [dbo].[aspnet_Membership_GetUserByEmail]
GO
CREATE PROCEDURE [dbo].[aspnet_Membership_GetUserByEmail]
    @ApplicationName  nvarchar(256),
    @Email            nvarchar(256)
AS
BEGIN
    IF( @Email IS NULL )
        SELECT  u.UserName
        FROM    dbo.aspnet_Applications a, dbo.aspnet_Users u, dbo.aspnet_Membership m
        WHERE   LOWER(@ApplicationName) = a.LoweredApplicationName AND
                u.ApplicationId = a.ApplicationId    AND
                u.UserId = m.UserId AND
                m.LoweredEmail IS NULL
    ELSE
        SELECT  u.UserName
        FROM    dbo.aspnet_Applications a, dbo.aspnet_Users u, dbo.aspnet_Membership m
        WHERE   LOWER(@ApplicationName) = a.LoweredApplicationName AND
                u.ApplicationId = a.ApplicationId    AND
                u.UserId = m.UserId AND
                LOWER(@Email) = m.LoweredEmail

    IF (@@rowcount = 0)
        RETURN(1)
    RETURN(0)
END
GO

-- ----------------------------
-- Procedure structure for [dbo].[aspnet_Membership_GetUserByName]
-- ----------------------------
DROP PROCEDURE [dbo].[aspnet_Membership_GetUserByName]
GO
CREATE PROCEDURE [dbo].[aspnet_Membership_GetUserByName]
    @ApplicationName      nvarchar(256),
    @UserName             nvarchar(256),
    @CurrentTimeUtc       datetime,
    @UpdateLastActivity   bit = 0
AS
BEGIN
    DECLARE @UserId uniqueidentifier

    IF (@UpdateLastActivity = 1)
    BEGIN
        -- select user ID from aspnet_users table
        SELECT TOP 1 @UserId = u.UserId
        FROM    dbo.aspnet_Applications a, dbo.aspnet_Users u, dbo.aspnet_Membership m
        WHERE    LOWER(@ApplicationName) = a.LoweredApplicationName AND
                u.ApplicationId = a.ApplicationId    AND
                LOWER(@UserName) = u.LoweredUserName AND u.UserId = m.UserId

        IF (@@ROWCOUNT = 0) -- Username not found
            RETURN -1

        UPDATE   dbo.aspnet_Users
        SET      LastActivityDate = @CurrentTimeUtc
        WHERE    @UserId = UserId

        SELECT m.Email, m.PasswordQuestion, m.Comment, m.IsApproved,
                m.CreateDate, m.LastLoginDate, u.LastActivityDate, m.LastPasswordChangedDate,
                u.UserId, m.IsLockedOut, m.LastLockoutDate
        FROM    dbo.aspnet_Applications a, dbo.aspnet_Users u, dbo.aspnet_Membership m
        WHERE  @UserId = u.UserId AND u.UserId = m.UserId 
    END
    ELSE
    BEGIN
        SELECT TOP 1 m.Email, m.PasswordQuestion, m.Comment, m.IsApproved,
                m.CreateDate, m.LastLoginDate, u.LastActivityDate, m.LastPasswordChangedDate,
                u.UserId, m.IsLockedOut,m.LastLockoutDate
        FROM    dbo.aspnet_Applications a, dbo.aspnet_Users u, dbo.aspnet_Membership m
        WHERE    LOWER(@ApplicationName) = a.LoweredApplicationName AND
                u.ApplicationId = a.ApplicationId    AND
                LOWER(@UserName) = u.LoweredUserName AND u.UserId = m.UserId

        IF (@@ROWCOUNT = 0) -- Username not found
            RETURN -1
    END

    RETURN 0
END
GO

-- ----------------------------
-- Procedure structure for [dbo].[aspnet_Membership_GetUserByUserId]
-- ----------------------------
DROP PROCEDURE [dbo].[aspnet_Membership_GetUserByUserId]
GO
CREATE PROCEDURE [dbo].[aspnet_Membership_GetUserByUserId]
    @UserId               uniqueidentifier,
    @CurrentTimeUtc       datetime,
    @UpdateLastActivity   bit = 0
AS
BEGIN
    IF ( @UpdateLastActivity = 1 )
    BEGIN
        UPDATE   dbo.aspnet_Users
        SET      LastActivityDate = @CurrentTimeUtc
        FROM     dbo.aspnet_Users
        WHERE    @UserId = UserId

        IF ( @@ROWCOUNT = 0 ) -- User ID not found
            RETURN -1
    END

    SELECT  m.Email, m.PasswordQuestion, m.Comment, m.IsApproved,
            m.CreateDate, m.LastLoginDate, u.LastActivityDate,
            m.LastPasswordChangedDate, u.UserName, m.IsLockedOut,
            m.LastLockoutDate
    FROM    dbo.aspnet_Users u, dbo.aspnet_Membership m
    WHERE   @UserId = u.UserId AND u.UserId = m.UserId

    IF ( @@ROWCOUNT = 0 ) -- User ID not found
       RETURN -1

    RETURN 0
END
GO

-- ----------------------------
-- Procedure structure for [dbo].[aspnet_Membership_ResetPassword]
-- ----------------------------
DROP PROCEDURE [dbo].[aspnet_Membership_ResetPassword]
GO
CREATE PROCEDURE [dbo].[aspnet_Membership_ResetPassword]
    @ApplicationName             nvarchar(256),
    @UserName                    nvarchar(256),
    @NewPassword                 nvarchar(128),
    @MaxInvalidPasswordAttempts  int,
    @PasswordAttemptWindow       int,
    @PasswordSalt                nvarchar(128),
    @CurrentTimeUtc              datetime,
    @PasswordFormat              int = 0,
    @PasswordAnswer              nvarchar(128) = NULL
AS
BEGIN
    DECLARE @IsLockedOut                            bit
    DECLARE @LastLockoutDate                        datetime
    DECLARE @FailedPasswordAttemptCount             int
    DECLARE @FailedPasswordAttemptWindowStart       datetime
    DECLARE @FailedPasswordAnswerAttemptCount       int
    DECLARE @FailedPasswordAnswerAttemptWindowStart datetime

    DECLARE @UserId                                 uniqueidentifier
    SET     @UserId = NULL

    DECLARE @ErrorCode     int
    SET @ErrorCode = 0

    DECLARE @TranStarted   bit
    SET @TranStarted = 0

    IF( @@TRANCOUNT = 0 )
    BEGIN
	    BEGIN TRANSACTION
	    SET @TranStarted = 1
    END
    ELSE
    	SET @TranStarted = 0

    SELECT  @UserId = u.UserId
    FROM    dbo.aspnet_Users u, dbo.aspnet_Applications a, dbo.aspnet_Membership m
    WHERE   LoweredUserName = LOWER(@UserName) AND
            u.ApplicationId = a.ApplicationId  AND
            LOWER(@ApplicationName) = a.LoweredApplicationName AND
            u.UserId = m.UserId

    IF ( @UserId IS NULL )
    BEGIN
        SET @ErrorCode = 1
        GOTO Cleanup
    END

    SELECT @IsLockedOut = IsLockedOut,
           @LastLockoutDate = LastLockoutDate,
           @FailedPasswordAttemptCount = FailedPasswordAttemptCount,
           @FailedPasswordAttemptWindowStart = FailedPasswordAttemptWindowStart,
           @FailedPasswordAnswerAttemptCount = FailedPasswordAnswerAttemptCount,
           @FailedPasswordAnswerAttemptWindowStart = FailedPasswordAnswerAttemptWindowStart
    FROM dbo.aspnet_Membership WITH ( UPDLOCK )
    WHERE @UserId = UserId

    IF( @IsLockedOut = 1 )
    BEGIN
        SET @ErrorCode = 99
        GOTO Cleanup
    END

    UPDATE dbo.aspnet_Membership
    SET    Password = @NewPassword,
           LastPasswordChangedDate = @CurrentTimeUtc,
           PasswordFormat = @PasswordFormat,
           PasswordSalt = @PasswordSalt
    WHERE  @UserId = UserId AND
           ( ( @PasswordAnswer IS NULL ) OR ( LOWER( PasswordAnswer ) = LOWER( @PasswordAnswer ) ) )

    IF ( @@ROWCOUNT = 0 )
        BEGIN
            IF( @CurrentTimeUtc > DATEADD( minute, @PasswordAttemptWindow, @FailedPasswordAnswerAttemptWindowStart ) )
            BEGIN
                SET @FailedPasswordAnswerAttemptWindowStart = @CurrentTimeUtc
                SET @FailedPasswordAnswerAttemptCount = 1
            END
            ELSE
            BEGIN
                SET @FailedPasswordAnswerAttemptWindowStart = @CurrentTimeUtc
                SET @FailedPasswordAnswerAttemptCount = @FailedPasswordAnswerAttemptCount + 1
            END

            BEGIN
                IF( @FailedPasswordAnswerAttemptCount >= @MaxInvalidPasswordAttempts )
                BEGIN
                    SET @IsLockedOut = 1
                    SET @LastLockoutDate = @CurrentTimeUtc
                END
            END

            SET @ErrorCode = 3
        END
    ELSE
        BEGIN
            IF( @FailedPasswordAnswerAttemptCount > 0 )
            BEGIN
                SET @FailedPasswordAnswerAttemptCount = 0
                SET @FailedPasswordAnswerAttemptWindowStart = CONVERT( datetime, '17540101', 112 )
            END
        END

    IF( NOT ( @PasswordAnswer IS NULL ) )
    BEGIN
        UPDATE dbo.aspnet_Membership
        SET IsLockedOut = @IsLockedOut, LastLockoutDate = @LastLockoutDate,
            FailedPasswordAttemptCount = @FailedPasswordAttemptCount,
            FailedPasswordAttemptWindowStart = @FailedPasswordAttemptWindowStart,
            FailedPasswordAnswerAttemptCount = @FailedPasswordAnswerAttemptCount,
            FailedPasswordAnswerAttemptWindowStart = @FailedPasswordAnswerAttemptWindowStart
        WHERE @UserId = UserId

        IF( @@ERROR <> 0 )
        BEGIN
            SET @ErrorCode = -1
            GOTO Cleanup
        END
    END

    IF( @TranStarted = 1 )
    BEGIN
	SET @TranStarted = 0
	COMMIT TRANSACTION
    END

    RETURN @ErrorCode

Cleanup:

    IF( @TranStarted = 1 )
    BEGIN
        SET @TranStarted = 0
    	ROLLBACK TRANSACTION
    END

    RETURN @ErrorCode

END
GO

-- ----------------------------
-- Procedure structure for [dbo].[aspnet_Membership_SetPassword]
-- ----------------------------
DROP PROCEDURE [dbo].[aspnet_Membership_SetPassword]
GO
CREATE PROCEDURE [dbo].[aspnet_Membership_SetPassword]
    @ApplicationName  nvarchar(256),
    @UserName         nvarchar(256),
    @NewPassword      nvarchar(128),
    @PasswordSalt     nvarchar(128),
    @CurrentTimeUtc   datetime,
    @PasswordFormat   int = 0
AS
BEGIN
    DECLARE @UserId uniqueidentifier
    SELECT  @UserId = NULL
    SELECT  @UserId = u.UserId
    FROM    dbo.aspnet_Users u, dbo.aspnet_Applications a, dbo.aspnet_Membership m
    WHERE   LoweredUserName = LOWER(@UserName) AND
            u.ApplicationId = a.ApplicationId  AND
            LOWER(@ApplicationName) = a.LoweredApplicationName AND
            u.UserId = m.UserId

    IF (@UserId IS NULL)
        RETURN(1)

    UPDATE dbo.aspnet_Membership
    SET Password = @NewPassword, PasswordFormat = @PasswordFormat, PasswordSalt = @PasswordSalt,
        LastPasswordChangedDate = @CurrentTimeUtc
    WHERE @UserId = UserId
    RETURN(0)
END
GO

-- ----------------------------
-- Procedure structure for [dbo].[aspnet_Membership_UnlockUser]
-- ----------------------------
DROP PROCEDURE [dbo].[aspnet_Membership_UnlockUser]
GO
CREATE PROCEDURE [dbo].[aspnet_Membership_UnlockUser]
    @ApplicationName                         nvarchar(256),
    @UserName                                nvarchar(256)
AS
BEGIN
    DECLARE @UserId uniqueidentifier
    SELECT  @UserId = NULL
    SELECT  @UserId = u.UserId
    FROM    dbo.aspnet_Users u, dbo.aspnet_Applications a, dbo.aspnet_Membership m
    WHERE   LoweredUserName = LOWER(@UserName) AND
            u.ApplicationId = a.ApplicationId  AND
            LOWER(@ApplicationName) = a.LoweredApplicationName AND
            u.UserId = m.UserId

    IF ( @UserId IS NULL )
        RETURN 1

    UPDATE dbo.aspnet_Membership
    SET IsLockedOut = 0,
        FailedPasswordAttemptCount = 0,
        FailedPasswordAttemptWindowStart = CONVERT( datetime, '17540101', 112 ),
        FailedPasswordAnswerAttemptCount = 0,
        FailedPasswordAnswerAttemptWindowStart = CONVERT( datetime, '17540101', 112 ),
        LastLockoutDate = CONVERT( datetime, '17540101', 112 )
    WHERE @UserId = UserId

    RETURN 0
END
GO

-- ----------------------------
-- Procedure structure for [dbo].[aspnet_Membership_UpdateUser]
-- ----------------------------
DROP PROCEDURE [dbo].[aspnet_Membership_UpdateUser]
GO
CREATE PROCEDURE [dbo].[aspnet_Membership_UpdateUser]
    @ApplicationName      nvarchar(256),
    @UserName             nvarchar(256),
    @Email                nvarchar(256),
    @Comment              ntext,
    @IsApproved           bit,
    @LastLoginDate        datetime,
    @LastActivityDate     datetime,
    @UniqueEmail          int,
    @CurrentTimeUtc       datetime
AS
BEGIN
    DECLARE @UserId uniqueidentifier
    DECLARE @ApplicationId uniqueidentifier
    SELECT  @UserId = NULL
    SELECT  @UserId = u.UserId, @ApplicationId = a.ApplicationId
    FROM    dbo.aspnet_Users u, dbo.aspnet_Applications a, dbo.aspnet_Membership m
    WHERE   LoweredUserName = LOWER(@UserName) AND
            u.ApplicationId = a.ApplicationId  AND
            LOWER(@ApplicationName) = a.LoweredApplicationName AND
            u.UserId = m.UserId

    IF (@UserId IS NULL)
        RETURN(1)

    IF (@UniqueEmail = 1)
    BEGIN
        IF (EXISTS (SELECT *
                    FROM  dbo.aspnet_Membership WITH (UPDLOCK, HOLDLOCK)
                    WHERE ApplicationId = @ApplicationId  AND @UserId <> UserId AND LoweredEmail = LOWER(@Email)))
        BEGIN
            RETURN(7)
        END
    END

    DECLARE @TranStarted   bit
    SET @TranStarted = 0

    IF( @@TRANCOUNT = 0 )
    BEGIN
	    BEGIN TRANSACTION
	    SET @TranStarted = 1
    END
    ELSE
	SET @TranStarted = 0

    UPDATE dbo.aspnet_Users WITH (ROWLOCK)
    SET
         LastActivityDate = @LastActivityDate
    WHERE
       @UserId = UserId

    IF( @@ERROR <> 0 )
        GOTO Cleanup

    UPDATE dbo.aspnet_Membership WITH (ROWLOCK)
    SET
         Email            = @Email,
         LoweredEmail     = LOWER(@Email),
         Comment          = @Comment,
         IsApproved       = @IsApproved,
         LastLoginDate    = @LastLoginDate
    WHERE
       @UserId = UserId

    IF( @@ERROR <> 0 )
        GOTO Cleanup

    IF( @TranStarted = 1 )
    BEGIN
	SET @TranStarted = 0
	COMMIT TRANSACTION
    END

    RETURN 0

Cleanup:

    IF( @TranStarted = 1 )
    BEGIN
        SET @TranStarted = 0
    	ROLLBACK TRANSACTION
    END

    RETURN -1
END
GO

-- ----------------------------
-- Procedure structure for [dbo].[aspnet_Membership_UpdateUserInfo]
-- ----------------------------
DROP PROCEDURE [dbo].[aspnet_Membership_UpdateUserInfo]
GO
CREATE PROCEDURE [dbo].[aspnet_Membership_UpdateUserInfo]
    @ApplicationName                nvarchar(256),
    @UserName                       nvarchar(256),
    @IsPasswordCorrect              bit,
    @UpdateLastLoginActivityDate    bit,
    @MaxInvalidPasswordAttempts     int,
    @PasswordAttemptWindow          int,
    @CurrentTimeUtc                 datetime,
    @LastLoginDate                  datetime,
    @LastActivityDate               datetime
AS
BEGIN
    DECLARE @UserId                                 uniqueidentifier
    DECLARE @IsApproved                             bit
    DECLARE @IsLockedOut                            bit
    DECLARE @LastLockoutDate                        datetime
    DECLARE @FailedPasswordAttemptCount             int
    DECLARE @FailedPasswordAttemptWindowStart       datetime
    DECLARE @FailedPasswordAnswerAttemptCount       int
    DECLARE @FailedPasswordAnswerAttemptWindowStart datetime

    DECLARE @ErrorCode     int
    SET @ErrorCode = 0

    DECLARE @TranStarted   bit
    SET @TranStarted = 0

    IF( @@TRANCOUNT = 0 )
    BEGIN
	    BEGIN TRANSACTION
	    SET @TranStarted = 1
    END
    ELSE
    	SET @TranStarted = 0

    SELECT  @UserId = u.UserId,
            @IsApproved = m.IsApproved,
            @IsLockedOut = m.IsLockedOut,
            @LastLockoutDate = m.LastLockoutDate,
            @FailedPasswordAttemptCount = m.FailedPasswordAttemptCount,
            @FailedPasswordAttemptWindowStart = m.FailedPasswordAttemptWindowStart,
            @FailedPasswordAnswerAttemptCount = m.FailedPasswordAnswerAttemptCount,
            @FailedPasswordAnswerAttemptWindowStart = m.FailedPasswordAnswerAttemptWindowStart
    FROM    dbo.aspnet_Applications a, dbo.aspnet_Users u, dbo.aspnet_Membership m WITH ( UPDLOCK )
    WHERE   LOWER(@ApplicationName) = a.LoweredApplicationName AND
            u.ApplicationId = a.ApplicationId    AND
            u.UserId = m.UserId AND
            LOWER(@UserName) = u.LoweredUserName

    IF ( @@rowcount = 0 )
    BEGIN
        SET @ErrorCode = 1
        GOTO Cleanup
    END

    IF( @IsLockedOut = 1 )
    BEGIN
        GOTO Cleanup
    END

    IF( @IsPasswordCorrect = 0 )
    BEGIN
        IF( @CurrentTimeUtc > DATEADD( minute, @PasswordAttemptWindow, @FailedPasswordAttemptWindowStart ) )
        BEGIN
            SET @FailedPasswordAttemptWindowStart = @CurrentTimeUtc
            SET @FailedPasswordAttemptCount = 1
        END
        ELSE
        BEGIN
            SET @FailedPasswordAttemptWindowStart = @CurrentTimeUtc
            SET @FailedPasswordAttemptCount = @FailedPasswordAttemptCount + 1
        END

        BEGIN
            IF( @FailedPasswordAttemptCount >= @MaxInvalidPasswordAttempts )
            BEGIN
                SET @IsLockedOut = 1
                SET @LastLockoutDate = @CurrentTimeUtc
            END
        END
    END
    ELSE
    BEGIN
        IF( @FailedPasswordAttemptCount > 0 OR @FailedPasswordAnswerAttemptCount > 0 )
        BEGIN
            SET @FailedPasswordAttemptCount = 0
            SET @FailedPasswordAttemptWindowStart = CONVERT( datetime, '17540101', 112 )
            SET @FailedPasswordAnswerAttemptCount = 0
            SET @FailedPasswordAnswerAttemptWindowStart = CONVERT( datetime, '17540101', 112 )
            SET @LastLockoutDate = CONVERT( datetime, '17540101', 112 )
        END
    END

    IF( @UpdateLastLoginActivityDate = 1 )
    BEGIN
        UPDATE  dbo.aspnet_Users
        SET     LastActivityDate = @LastActivityDate
        WHERE   @UserId = UserId

        IF( @@ERROR <> 0 )
        BEGIN
            SET @ErrorCode = -1
            GOTO Cleanup
        END

        UPDATE  dbo.aspnet_Membership
        SET     LastLoginDate = @LastLoginDate
        WHERE   UserId = @UserId

        IF( @@ERROR <> 0 )
        BEGIN
            SET @ErrorCode = -1
            GOTO Cleanup
        END
    END


    UPDATE dbo.aspnet_Membership
    SET IsLockedOut = @IsLockedOut, LastLockoutDate = @LastLockoutDate,
        FailedPasswordAttemptCount = @FailedPasswordAttemptCount,
        FailedPasswordAttemptWindowStart = @FailedPasswordAttemptWindowStart,
        FailedPasswordAnswerAttemptCount = @FailedPasswordAnswerAttemptCount,
        FailedPasswordAnswerAttemptWindowStart = @FailedPasswordAnswerAttemptWindowStart
    WHERE @UserId = UserId

    IF( @@ERROR <> 0 )
    BEGIN
        SET @ErrorCode = -1
        GOTO Cleanup
    END

    IF( @TranStarted = 1 )
    BEGIN
	SET @TranStarted = 0
	COMMIT TRANSACTION
    END

    RETURN @ErrorCode

Cleanup:

    IF( @TranStarted = 1 )
    BEGIN
        SET @TranStarted = 0
    	ROLLBACK TRANSACTION
    END

    RETURN @ErrorCode

END
GO

-- ----------------------------
-- Procedure structure for [dbo].[aspnet_Paths_CreatePath]
-- ----------------------------
DROP PROCEDURE [dbo].[aspnet_Paths_CreatePath]
GO
CREATE PROCEDURE [dbo].[aspnet_Paths_CreatePath]
    @ApplicationId UNIQUEIDENTIFIER,
    @Path           NVARCHAR(256),
    @PathId         UNIQUEIDENTIFIER OUTPUT
AS
BEGIN
    BEGIN TRANSACTION
    IF (NOT EXISTS(SELECT * FROM dbo.aspnet_Paths WHERE LoweredPath = LOWER(@Path) AND ApplicationId = @ApplicationId))
    BEGIN
        INSERT dbo.aspnet_Paths (ApplicationId, Path, LoweredPath) VALUES (@ApplicationId, @Path, LOWER(@Path))
    END
    COMMIT TRANSACTION
    SELECT @PathId = PathId FROM dbo.aspnet_Paths WHERE LOWER(@Path) = LoweredPath AND ApplicationId = @ApplicationId
END
GO

-- ----------------------------
-- Procedure structure for [dbo].[aspnet_Personalization_GetApplicationId]
-- ----------------------------
DROP PROCEDURE [dbo].[aspnet_Personalization_GetApplicationId]
GO
CREATE PROCEDURE [dbo].[aspnet_Personalization_GetApplicationId] (
    @ApplicationName NVARCHAR(256),
    @ApplicationId UNIQUEIDENTIFIER OUT)
AS
BEGIN
    SELECT @ApplicationId = ApplicationId FROM dbo.aspnet_Applications WHERE LOWER(@ApplicationName) = LoweredApplicationName
END
GO

-- ----------------------------
-- Procedure structure for [dbo].[aspnet_PersonalizationAdministration_DeleteAllState]
-- ----------------------------
DROP PROCEDURE [dbo].[aspnet_PersonalizationAdministration_DeleteAllState]
GO
CREATE PROCEDURE [dbo].[aspnet_PersonalizationAdministration_DeleteAllState] (
    @AllUsersScope bit,
    @ApplicationName NVARCHAR(256),
    @Count int OUT)
AS
BEGIN
    DECLARE @ApplicationId UNIQUEIDENTIFIER
    EXEC dbo.aspnet_Personalization_GetApplicationId @ApplicationName, @ApplicationId OUTPUT
    IF (@ApplicationId IS NULL)
        SELECT @Count = 0
    ELSE
    BEGIN
        IF (@AllUsersScope = 1)
            DELETE FROM aspnet_PersonalizationAllUsers
            WHERE PathId IN
               (SELECT Paths.PathId
                FROM dbo.aspnet_Paths Paths
                WHERE Paths.ApplicationId = @ApplicationId)
        ELSE
            DELETE FROM aspnet_PersonalizationPerUser
            WHERE PathId IN
               (SELECT Paths.PathId
                FROM dbo.aspnet_Paths Paths
                WHERE Paths.ApplicationId = @ApplicationId)

        SELECT @Count = @@ROWCOUNT
    END
END
GO

-- ----------------------------
-- Procedure structure for [dbo].[aspnet_PersonalizationAdministration_FindState]
-- ----------------------------
DROP PROCEDURE [dbo].[aspnet_PersonalizationAdministration_FindState]
GO
CREATE PROCEDURE [dbo].[aspnet_PersonalizationAdministration_FindState] (
    @AllUsersScope bit,
    @ApplicationName NVARCHAR(256),
    @PageIndex              INT,
    @PageSize               INT,
    @Path NVARCHAR(256) = NULL,
    @UserName NVARCHAR(256) = NULL,
    @InactiveSinceDate DATETIME = NULL)
AS
BEGIN
    DECLARE @ApplicationId UNIQUEIDENTIFIER
    EXEC dbo.aspnet_Personalization_GetApplicationId @ApplicationName, @ApplicationId OUTPUT
    IF (@ApplicationId IS NULL)
        RETURN

    -- Set the page bounds
    DECLARE @PageLowerBound INT
    DECLARE @PageUpperBound INT
    DECLARE @TotalRecords   INT
    SET @PageLowerBound = @PageSize * @PageIndex
    SET @PageUpperBound = @PageSize - 1 + @PageLowerBound

    -- Create a temp table to store the selected results
    CREATE TABLE #PageIndex (
        IndexId int IDENTITY (0, 1) NOT NULL,
        ItemId UNIQUEIDENTIFIER
    )

    IF (@AllUsersScope = 1)
    BEGIN
        -- Insert into our temp table
        INSERT INTO #PageIndex (ItemId)
        SELECT Paths.PathId
        FROM dbo.aspnet_Paths Paths,
             ((SELECT Paths.PathId
               FROM dbo.aspnet_PersonalizationAllUsers AllUsers, dbo.aspnet_Paths Paths
               WHERE Paths.ApplicationId = @ApplicationId
                      AND AllUsers.PathId = Paths.PathId
                      AND (@Path IS NULL OR Paths.LoweredPath LIKE LOWER(@Path))
              ) AS SharedDataPerPath
              FULL OUTER JOIN
              (SELECT DISTINCT Paths.PathId
               FROM dbo.aspnet_PersonalizationPerUser PerUser, dbo.aspnet_Paths Paths
               WHERE Paths.ApplicationId = @ApplicationId
                      AND PerUser.PathId = Paths.PathId
                      AND (@Path IS NULL OR Paths.LoweredPath LIKE LOWER(@Path))
              ) AS UserDataPerPath
              ON SharedDataPerPath.PathId = UserDataPerPath.PathId
             )
        WHERE Paths.PathId = SharedDataPerPath.PathId OR Paths.PathId = UserDataPerPath.PathId
        ORDER BY Paths.Path ASC

        SELECT @TotalRecords = @@ROWCOUNT

        SELECT Paths.Path,
               SharedDataPerPath.LastUpdatedDate,
               SharedDataPerPath.SharedDataLength,
               UserDataPerPath.UserDataLength,
               UserDataPerPath.UserCount
        FROM dbo.aspnet_Paths Paths,
             ((SELECT PageIndex.ItemId AS PathId,
                      AllUsers.LastUpdatedDate AS LastUpdatedDate,
                      DATALENGTH(AllUsers.PageSettings) AS SharedDataLength
               FROM dbo.aspnet_PersonalizationAllUsers AllUsers, #PageIndex PageIndex
               WHERE AllUsers.PathId = PageIndex.ItemId
                     AND PageIndex.IndexId >= @PageLowerBound AND PageIndex.IndexId <= @PageUpperBound
              ) AS SharedDataPerPath
              FULL OUTER JOIN
              (SELECT PageIndex.ItemId AS PathId,
                      SUM(DATALENGTH(PerUser.PageSettings)) AS UserDataLength,
                      COUNT(*) AS UserCount
               FROM aspnet_PersonalizationPerUser PerUser, #PageIndex PageIndex
               WHERE PerUser.PathId = PageIndex.ItemId
                     AND PageIndex.IndexId >= @PageLowerBound AND PageIndex.IndexId <= @PageUpperBound
               GROUP BY PageIndex.ItemId
              ) AS UserDataPerPath
              ON SharedDataPerPath.PathId = UserDataPerPath.PathId
             )
        WHERE Paths.PathId = SharedDataPerPath.PathId OR Paths.PathId = UserDataPerPath.PathId
        ORDER BY Paths.Path ASC
    END
    ELSE
    BEGIN
        -- Insert into our temp table
        INSERT INTO #PageIndex (ItemId)
        SELECT PerUser.Id
        FROM dbo.aspnet_PersonalizationPerUser PerUser, dbo.aspnet_Users Users, dbo.aspnet_Paths Paths
        WHERE Paths.ApplicationId = @ApplicationId
              AND PerUser.UserId = Users.UserId
              AND PerUser.PathId = Paths.PathId
              AND (@Path IS NULL OR Paths.LoweredPath LIKE LOWER(@Path))
              AND (@UserName IS NULL OR Users.LoweredUserName LIKE LOWER(@UserName))
              AND (@InactiveSinceDate IS NULL OR Users.LastActivityDate <= @InactiveSinceDate)
        ORDER BY Paths.Path ASC, Users.UserName ASC

        SELECT @TotalRecords = @@ROWCOUNT

        SELECT Paths.Path, PerUser.LastUpdatedDate, DATALENGTH(PerUser.PageSettings), Users.UserName, Users.LastActivityDate
        FROM dbo.aspnet_PersonalizationPerUser PerUser, dbo.aspnet_Users Users, dbo.aspnet_Paths Paths, #PageIndex PageIndex
        WHERE PerUser.Id = PageIndex.ItemId
              AND PerUser.UserId = Users.UserId
              AND PerUser.PathId = Paths.PathId
              AND PageIndex.IndexId >= @PageLowerBound AND PageIndex.IndexId <= @PageUpperBound
        ORDER BY Paths.Path ASC, Users.UserName ASC
    END

    RETURN @TotalRecords
END
GO

-- ----------------------------
-- Procedure structure for [dbo].[aspnet_PersonalizationAdministration_GetCountOfState]
-- ----------------------------
DROP PROCEDURE [dbo].[aspnet_PersonalizationAdministration_GetCountOfState]
GO
CREATE PROCEDURE [dbo].[aspnet_PersonalizationAdministration_GetCountOfState] (
    @Count int OUT,
    @AllUsersScope bit,
    @ApplicationName NVARCHAR(256),
    @Path NVARCHAR(256) = NULL,
    @UserName NVARCHAR(256) = NULL,
    @InactiveSinceDate DATETIME = NULL)
AS
BEGIN

    DECLARE @ApplicationId UNIQUEIDENTIFIER
    EXEC dbo.aspnet_Personalization_GetApplicationId @ApplicationName, @ApplicationId OUTPUT
    IF (@ApplicationId IS NULL)
        SELECT @Count = 0
    ELSE
        IF (@AllUsersScope = 1)
            SELECT @Count = COUNT(*)
            FROM dbo.aspnet_PersonalizationAllUsers AllUsers, dbo.aspnet_Paths Paths
            WHERE Paths.ApplicationId = @ApplicationId
                  AND AllUsers.PathId = Paths.PathId
                  AND (@Path IS NULL OR Paths.LoweredPath LIKE LOWER(@Path))
        ELSE
            SELECT @Count = COUNT(*)
            FROM dbo.aspnet_PersonalizationPerUser PerUser, dbo.aspnet_Users Users, dbo.aspnet_Paths Paths
            WHERE Paths.ApplicationId = @ApplicationId
                  AND PerUser.UserId = Users.UserId
                  AND PerUser.PathId = Paths.PathId
                  AND (@Path IS NULL OR Paths.LoweredPath LIKE LOWER(@Path))
                  AND (@UserName IS NULL OR Users.LoweredUserName LIKE LOWER(@UserName))
                  AND (@InactiveSinceDate IS NULL OR Users.LastActivityDate <= @InactiveSinceDate)
END
GO

-- ----------------------------
-- Procedure structure for [dbo].[aspnet_PersonalizationAdministration_ResetSharedState]
-- ----------------------------
DROP PROCEDURE [dbo].[aspnet_PersonalizationAdministration_ResetSharedState]
GO
CREATE PROCEDURE [dbo].[aspnet_PersonalizationAdministration_ResetSharedState] (
    @Count int OUT,
    @ApplicationName NVARCHAR(256),
    @Path NVARCHAR(256))
AS
BEGIN
    DECLARE @ApplicationId UNIQUEIDENTIFIER
    EXEC dbo.aspnet_Personalization_GetApplicationId @ApplicationName, @ApplicationId OUTPUT
    IF (@ApplicationId IS NULL)
        SELECT @Count = 0
    ELSE
    BEGIN
        DELETE FROM dbo.aspnet_PersonalizationAllUsers
        WHERE PathId IN
            (SELECT AllUsers.PathId
             FROM dbo.aspnet_PersonalizationAllUsers AllUsers, dbo.aspnet_Paths Paths
             WHERE Paths.ApplicationId = @ApplicationId
                   AND AllUsers.PathId = Paths.PathId
                   AND Paths.LoweredPath = LOWER(@Path))

        SELECT @Count = @@ROWCOUNT
    END
END
GO

-- ----------------------------
-- Procedure structure for [dbo].[aspnet_PersonalizationAdministration_ResetUserState]
-- ----------------------------
DROP PROCEDURE [dbo].[aspnet_PersonalizationAdministration_ResetUserState]
GO
CREATE PROCEDURE [dbo].[aspnet_PersonalizationAdministration_ResetUserState] (
    @Count                  int                 OUT,
    @ApplicationName        NVARCHAR(256),
    @InactiveSinceDate      DATETIME            = NULL,
    @UserName               NVARCHAR(256)       = NULL,
    @Path                   NVARCHAR(256)       = NULL)
AS
BEGIN
    DECLARE @ApplicationId UNIQUEIDENTIFIER
    EXEC dbo.aspnet_Personalization_GetApplicationId @ApplicationName, @ApplicationId OUTPUT
    IF (@ApplicationId IS NULL)
        SELECT @Count = 0
    ELSE
    BEGIN
        DELETE FROM dbo.aspnet_PersonalizationPerUser
        WHERE Id IN (SELECT PerUser.Id
                     FROM dbo.aspnet_PersonalizationPerUser PerUser, dbo.aspnet_Users Users, dbo.aspnet_Paths Paths
                     WHERE Paths.ApplicationId = @ApplicationId
                           AND PerUser.UserId = Users.UserId
                           AND PerUser.PathId = Paths.PathId
                           AND (@InactiveSinceDate IS NULL OR Users.LastActivityDate <= @InactiveSinceDate)
                           AND (@UserName IS NULL OR Users.LoweredUserName = LOWER(@UserName))
                           AND (@Path IS NULL OR Paths.LoweredPath = LOWER(@Path)))

        SELECT @Count = @@ROWCOUNT
    END
END
GO

-- ----------------------------
-- Procedure structure for [dbo].[aspnet_PersonalizationAllUsers_GetPageSettings]
-- ----------------------------
DROP PROCEDURE [dbo].[aspnet_PersonalizationAllUsers_GetPageSettings]
GO
CREATE PROCEDURE [dbo].[aspnet_PersonalizationAllUsers_GetPageSettings] (
    @ApplicationName  NVARCHAR(256),
    @Path              NVARCHAR(256))
AS
BEGIN
    DECLARE @ApplicationId UNIQUEIDENTIFIER
    DECLARE @PathId UNIQUEIDENTIFIER

    SELECT @ApplicationId = NULL
    SELECT @PathId = NULL

    EXEC dbo.aspnet_Personalization_GetApplicationId @ApplicationName, @ApplicationId OUTPUT
    IF (@ApplicationId IS NULL)
    BEGIN
        RETURN
    END

    SELECT @PathId = u.PathId FROM dbo.aspnet_Paths u WHERE u.ApplicationId = @ApplicationId AND u.LoweredPath = LOWER(@Path)
    IF (@PathId IS NULL)
    BEGIN
        RETURN
    END

    SELECT p.PageSettings FROM dbo.aspnet_PersonalizationAllUsers p WHERE p.PathId = @PathId
END
GO

-- ----------------------------
-- Procedure structure for [dbo].[aspnet_PersonalizationAllUsers_ResetPageSettings]
-- ----------------------------
DROP PROCEDURE [dbo].[aspnet_PersonalizationAllUsers_ResetPageSettings]
GO
CREATE PROCEDURE [dbo].[aspnet_PersonalizationAllUsers_ResetPageSettings] (
    @ApplicationName  NVARCHAR(256),
    @Path              NVARCHAR(256))
AS
BEGIN
    DECLARE @ApplicationId UNIQUEIDENTIFIER
    DECLARE @PathId UNIQUEIDENTIFIER

    SELECT @ApplicationId = NULL
    SELECT @PathId = NULL

    EXEC dbo.aspnet_Personalization_GetApplicationId @ApplicationName, @ApplicationId OUTPUT
    IF (@ApplicationId IS NULL)
    BEGIN
        RETURN
    END

    SELECT @PathId = u.PathId FROM dbo.aspnet_Paths u WHERE u.ApplicationId = @ApplicationId AND u.LoweredPath = LOWER(@Path)
    IF (@PathId IS NULL)
    BEGIN
        RETURN
    END

    DELETE FROM dbo.aspnet_PersonalizationAllUsers WHERE PathId = @PathId
    RETURN 0
END
GO

-- ----------------------------
-- Procedure structure for [dbo].[aspnet_PersonalizationAllUsers_SetPageSettings]
-- ----------------------------
DROP PROCEDURE [dbo].[aspnet_PersonalizationAllUsers_SetPageSettings]
GO
CREATE PROCEDURE [dbo].[aspnet_PersonalizationAllUsers_SetPageSettings] (
    @ApplicationName  NVARCHAR(256),
    @Path             NVARCHAR(256),
    @PageSettings     IMAGE,
    @CurrentTimeUtc   DATETIME)
AS
BEGIN
    DECLARE @ApplicationId UNIQUEIDENTIFIER
    DECLARE @PathId UNIQUEIDENTIFIER

    SELECT @ApplicationId = NULL
    SELECT @PathId = NULL

    EXEC dbo.aspnet_Applications_CreateApplication @ApplicationName, @ApplicationId OUTPUT

    SELECT @PathId = u.PathId FROM dbo.aspnet_Paths u WHERE u.ApplicationId = @ApplicationId AND u.LoweredPath = LOWER(@Path)
    IF (@PathId IS NULL)
    BEGIN
        EXEC dbo.aspnet_Paths_CreatePath @ApplicationId, @Path, @PathId OUTPUT
    END

    IF (EXISTS(SELECT PathId FROM dbo.aspnet_PersonalizationAllUsers WHERE PathId = @PathId))
        UPDATE dbo.aspnet_PersonalizationAllUsers SET PageSettings = @PageSettings, LastUpdatedDate = @CurrentTimeUtc WHERE PathId = @PathId
    ELSE
        INSERT INTO dbo.aspnet_PersonalizationAllUsers(PathId, PageSettings, LastUpdatedDate) VALUES (@PathId, @PageSettings, @CurrentTimeUtc)
    RETURN 0
END
GO

-- ----------------------------
-- Procedure structure for [dbo].[aspnet_PersonalizationPerUser_GetPageSettings]
-- ----------------------------
DROP PROCEDURE [dbo].[aspnet_PersonalizationPerUser_GetPageSettings]
GO
CREATE PROCEDURE [dbo].[aspnet_PersonalizationPerUser_GetPageSettings] (
    @ApplicationName  NVARCHAR(256),
    @UserName         NVARCHAR(256),
    @Path             NVARCHAR(256),
    @CurrentTimeUtc   DATETIME)
AS
BEGIN
    DECLARE @ApplicationId UNIQUEIDENTIFIER
    DECLARE @PathId UNIQUEIDENTIFIER
    DECLARE @UserId UNIQUEIDENTIFIER

    SELECT @ApplicationId = NULL
    SELECT @PathId = NULL
    SELECT @UserId = NULL

    EXEC dbo.aspnet_Personalization_GetApplicationId @ApplicationName, @ApplicationId OUTPUT
    IF (@ApplicationId IS NULL)
    BEGIN
        RETURN
    END

    SELECT @PathId = u.PathId FROM dbo.aspnet_Paths u WHERE u.ApplicationId = @ApplicationId AND u.LoweredPath = LOWER(@Path)
    IF (@PathId IS NULL)
    BEGIN
        RETURN
    END

    SELECT @UserId = u.UserId FROM dbo.aspnet_Users u WHERE u.ApplicationId = @ApplicationId AND u.LoweredUserName = LOWER(@UserName)
    IF (@UserId IS NULL)
    BEGIN
        RETURN
    END

    UPDATE   dbo.aspnet_Users WITH (ROWLOCK)
    SET      LastActivityDate = @CurrentTimeUtc
    WHERE    UserId = @UserId
    IF (@@ROWCOUNT = 0) -- Username not found
        RETURN

    SELECT p.PageSettings FROM dbo.aspnet_PersonalizationPerUser p WHERE p.PathId = @PathId AND p.UserId = @UserId
END
GO

-- ----------------------------
-- Procedure structure for [dbo].[aspnet_PersonalizationPerUser_ResetPageSettings]
-- ----------------------------
DROP PROCEDURE [dbo].[aspnet_PersonalizationPerUser_ResetPageSettings]
GO
CREATE PROCEDURE [dbo].[aspnet_PersonalizationPerUser_ResetPageSettings] (
    @ApplicationName  NVARCHAR(256),
    @UserName         NVARCHAR(256),
    @Path             NVARCHAR(256),
    @CurrentTimeUtc   DATETIME)
AS
BEGIN
    DECLARE @ApplicationId UNIQUEIDENTIFIER
    DECLARE @PathId UNIQUEIDENTIFIER
    DECLARE @UserId UNIQUEIDENTIFIER

    SELECT @ApplicationId = NULL
    SELECT @PathId = NULL
    SELECT @UserId = NULL

    EXEC dbo.aspnet_Personalization_GetApplicationId @ApplicationName, @ApplicationId OUTPUT
    IF (@ApplicationId IS NULL)
    BEGIN
        RETURN
    END

    SELECT @PathId = u.PathId FROM dbo.aspnet_Paths u WHERE u.ApplicationId = @ApplicationId AND u.LoweredPath = LOWER(@Path)
    IF (@PathId IS NULL)
    BEGIN
        RETURN
    END

    SELECT @UserId = u.UserId FROM dbo.aspnet_Users u WHERE u.ApplicationId = @ApplicationId AND u.LoweredUserName = LOWER(@UserName)
    IF (@UserId IS NULL)
    BEGIN
        RETURN
    END

    UPDATE   dbo.aspnet_Users WITH (ROWLOCK)
    SET      LastActivityDate = @CurrentTimeUtc
    WHERE    UserId = @UserId
    IF (@@ROWCOUNT = 0) -- Username not found
        RETURN

    DELETE FROM dbo.aspnet_PersonalizationPerUser WHERE PathId = @PathId AND UserId = @UserId
    RETURN 0
END
GO

-- ----------------------------
-- Procedure structure for [dbo].[aspnet_PersonalizationPerUser_SetPageSettings]
-- ----------------------------
DROP PROCEDURE [dbo].[aspnet_PersonalizationPerUser_SetPageSettings]
GO
CREATE PROCEDURE [dbo].[aspnet_PersonalizationPerUser_SetPageSettings] (
    @ApplicationName  NVARCHAR(256),
    @UserName         NVARCHAR(256),
    @Path             NVARCHAR(256),
    @PageSettings     IMAGE,
    @CurrentTimeUtc   DATETIME)
AS
BEGIN
    DECLARE @ApplicationId UNIQUEIDENTIFIER
    DECLARE @PathId UNIQUEIDENTIFIER
    DECLARE @UserId UNIQUEIDENTIFIER

    SELECT @ApplicationId = NULL
    SELECT @PathId = NULL
    SELECT @UserId = NULL

    EXEC dbo.aspnet_Applications_CreateApplication @ApplicationName, @ApplicationId OUTPUT

    SELECT @PathId = u.PathId FROM dbo.aspnet_Paths u WHERE u.ApplicationId = @ApplicationId AND u.LoweredPath = LOWER(@Path)
    IF (@PathId IS NULL)
    BEGIN
        EXEC dbo.aspnet_Paths_CreatePath @ApplicationId, @Path, @PathId OUTPUT
    END

    SELECT @UserId = u.UserId FROM dbo.aspnet_Users u WHERE u.ApplicationId = @ApplicationId AND u.LoweredUserName = LOWER(@UserName)
    IF (@UserId IS NULL)
    BEGIN
        EXEC dbo.aspnet_Users_CreateUser @ApplicationId, @UserName, 0, @CurrentTimeUtc, @UserId OUTPUT
    END

    UPDATE   dbo.aspnet_Users WITH (ROWLOCK)
    SET      LastActivityDate = @CurrentTimeUtc
    WHERE    UserId = @UserId
    IF (@@ROWCOUNT = 0) -- Username not found
        RETURN

    IF (EXISTS(SELECT PathId FROM dbo.aspnet_PersonalizationPerUser WHERE UserId = @UserId AND PathId = @PathId))
        UPDATE dbo.aspnet_PersonalizationPerUser SET PageSettings = @PageSettings, LastUpdatedDate = @CurrentTimeUtc WHERE UserId = @UserId AND PathId = @PathId
    ELSE
        INSERT INTO dbo.aspnet_PersonalizationPerUser(UserId, PathId, PageSettings, LastUpdatedDate) VALUES (@UserId, @PathId, @PageSettings, @CurrentTimeUtc)
    RETURN 0
END
GO

-- ----------------------------
-- Procedure structure for [dbo].[aspnet_Profile_DeleteInactiveProfiles]
-- ----------------------------
DROP PROCEDURE [dbo].[aspnet_Profile_DeleteInactiveProfiles]
GO

CREATE PROCEDURE [dbo].[aspnet_Profile_DeleteInactiveProfiles]
    @ApplicationName        nvarchar(256),
    @ProfileAuthOptions     int,
    @InactiveSinceDate      datetime
AS
BEGIN
    DECLARE @ApplicationId uniqueidentifier
    SELECT  @ApplicationId = NULL
    SELECT  @ApplicationId = ApplicationId FROM aspnet_Applications WHERE LOWER(@ApplicationName) = LoweredApplicationName
    IF (@ApplicationId IS NULL)
    BEGIN
        SELECT  0
        RETURN
    END

    DELETE
    FROM    dbo.aspnet_Profile
    WHERE   UserId IN
            (   SELECT  UserId
                FROM    dbo.aspnet_Users u
                WHERE   ApplicationId = @ApplicationId
                        AND (LastActivityDate <= @InactiveSinceDate)
                        AND (
                                (@ProfileAuthOptions = 2)
                             OR (@ProfileAuthOptions = 0 AND IsAnonymous = 1)
                             OR (@ProfileAuthOptions = 1 AND IsAnonymous = 0)
                            )
            )

    SELECT  @@ROWCOUNT
END
GO

-- ----------------------------
-- Procedure structure for [dbo].[aspnet_Profile_DeleteProfiles]
-- ----------------------------
DROP PROCEDURE [dbo].[aspnet_Profile_DeleteProfiles]
GO

CREATE PROCEDURE [dbo].[aspnet_Profile_DeleteProfiles]
    @ApplicationName        nvarchar(256),
    @UserNames              nvarchar(4000)
AS
BEGIN
    DECLARE @UserName     nvarchar(256)
    DECLARE @CurrentPos   int
    DECLARE @NextPos      int
    DECLARE @NumDeleted   int
    DECLARE @DeletedUser  int
    DECLARE @TranStarted  bit
    DECLARE @ErrorCode    int

    SET @ErrorCode = 0
    SET @CurrentPos = 1
    SET @NumDeleted = 0
    SET @TranStarted = 0

    IF( @@TRANCOUNT = 0 )
    BEGIN
        BEGIN TRANSACTION
        SET @TranStarted = 1
    END
    ELSE
    	SET @TranStarted = 0

    WHILE (@CurrentPos <= LEN(@UserNames))
    BEGIN
        SELECT @NextPos = CHARINDEX(N',', @UserNames,  @CurrentPos)
        IF (@NextPos = 0 OR @NextPos IS NULL)
            SELECT @NextPos = LEN(@UserNames) + 1

        SELECT @UserName = SUBSTRING(@UserNames, @CurrentPos, @NextPos - @CurrentPos)
        SELECT @CurrentPos = @NextPos+1

        IF (LEN(@UserName) > 0)
        BEGIN
            SELECT @DeletedUser = 0
            EXEC dbo.aspnet_Users_DeleteUser @ApplicationName, @UserName, 4, @DeletedUser OUTPUT
            IF( @@ERROR <> 0 )
            BEGIN
                SET @ErrorCode = -1
                GOTO Cleanup
            END
            IF (@DeletedUser <> 0)
                SELECT @NumDeleted = @NumDeleted + 1
        END
    END
    SELECT @NumDeleted
    IF (@TranStarted = 1)
    BEGIN
    	SET @TranStarted = 0
    	COMMIT TRANSACTION
    END
    SET @TranStarted = 0

    RETURN 0

Cleanup:
    IF (@TranStarted = 1 )
    BEGIN
        SET @TranStarted = 0
    	ROLLBACK TRANSACTION
    END
    RETURN @ErrorCode
END
GO

-- ----------------------------
-- Procedure structure for [dbo].[aspnet_Profile_GetNumberOfInactiveProfiles]
-- ----------------------------
DROP PROCEDURE [dbo].[aspnet_Profile_GetNumberOfInactiveProfiles]
GO

CREATE PROCEDURE [dbo].[aspnet_Profile_GetNumberOfInactiveProfiles]
    @ApplicationName        nvarchar(256),
    @ProfileAuthOptions     int,
    @InactiveSinceDate      datetime
AS
BEGIN
    DECLARE @ApplicationId uniqueidentifier
    SELECT  @ApplicationId = NULL
    SELECT  @ApplicationId = ApplicationId FROM aspnet_Applications WHERE LOWER(@ApplicationName) = LoweredApplicationName
    IF (@ApplicationId IS NULL)
    BEGIN
        SELECT 0
        RETURN
    END

    SELECT  COUNT(*)
    FROM    dbo.aspnet_Users u, dbo.aspnet_Profile p
    WHERE   ApplicationId = @ApplicationId
        AND u.UserId = p.UserId
        AND (LastActivityDate <= @InactiveSinceDate)
        AND (
                (@ProfileAuthOptions = 2)
                OR (@ProfileAuthOptions = 0 AND IsAnonymous = 1)
                OR (@ProfileAuthOptions = 1 AND IsAnonymous = 0)
            )
END
GO

-- ----------------------------
-- Procedure structure for [dbo].[aspnet_Profile_GetProfiles]
-- ----------------------------
DROP PROCEDURE [dbo].[aspnet_Profile_GetProfiles]
GO

CREATE PROCEDURE [dbo].[aspnet_Profile_GetProfiles]
    @ApplicationName        nvarchar(256),
    @ProfileAuthOptions     int,
    @PageIndex              int,
    @PageSize               int,
    @UserNameToMatch        nvarchar(256) = NULL,
    @InactiveSinceDate      datetime      = NULL
AS
BEGIN
    DECLARE @ApplicationId uniqueidentifier
    SELECT  @ApplicationId = NULL
    SELECT  @ApplicationId = ApplicationId FROM aspnet_Applications WHERE LOWER(@ApplicationName) = LoweredApplicationName
    IF (@ApplicationId IS NULL)
        RETURN

    -- Set the page bounds
    DECLARE @PageLowerBound int
    DECLARE @PageUpperBound int
    DECLARE @TotalRecords   int
    SET @PageLowerBound = @PageSize * @PageIndex
    SET @PageUpperBound = @PageSize - 1 + @PageLowerBound

    -- Create a temp table TO store the select results
    CREATE TABLE #PageIndexForUsers
    (
        IndexId int IDENTITY (0, 1) NOT NULL,
        UserId uniqueidentifier
    )

    -- Insert into our temp table
    INSERT INTO #PageIndexForUsers (UserId)
        SELECT  u.UserId
        FROM    dbo.aspnet_Users u, dbo.aspnet_Profile p
        WHERE   ApplicationId = @ApplicationId
            AND u.UserId = p.UserId
            AND (@InactiveSinceDate IS NULL OR LastActivityDate <= @InactiveSinceDate)
            AND (     (@ProfileAuthOptions = 2)
                   OR (@ProfileAuthOptions = 0 AND IsAnonymous = 1)
                   OR (@ProfileAuthOptions = 1 AND IsAnonymous = 0)
                 )
            AND (@UserNameToMatch IS NULL OR LoweredUserName LIKE LOWER(@UserNameToMatch))
        ORDER BY UserName

    SELECT  u.UserName, u.IsAnonymous, u.LastActivityDate, p.LastUpdatedDate,
            DATALENGTH(p.PropertyNames) + DATALENGTH(p.PropertyValuesString) + DATALENGTH(p.PropertyValuesBinary)
    FROM    dbo.aspnet_Users u, dbo.aspnet_Profile p, #PageIndexForUsers i
    WHERE   u.UserId = p.UserId AND p.UserId = i.UserId AND i.IndexId >= @PageLowerBound AND i.IndexId <= @PageUpperBound

    SELECT COUNT(*)
    FROM   #PageIndexForUsers

    DROP TABLE #PageIndexForUsers
END
GO

-- ----------------------------
-- Procedure structure for [dbo].[aspnet_Profile_GetProperties]
-- ----------------------------
DROP PROCEDURE [dbo].[aspnet_Profile_GetProperties]
GO

CREATE PROCEDURE [dbo].[aspnet_Profile_GetProperties]
    @ApplicationName      nvarchar(256),
    @UserName             nvarchar(256),
    @CurrentTimeUtc       datetime
AS
BEGIN
    DECLARE @ApplicationId uniqueidentifier
    SELECT  @ApplicationId = NULL
    SELECT  @ApplicationId = ApplicationId FROM dbo.aspnet_Applications WHERE LOWER(@ApplicationName) = LoweredApplicationName
    IF (@ApplicationId IS NULL)
        RETURN

    DECLARE @UserId uniqueidentifier
    SELECT  @UserId = NULL

    SELECT @UserId = UserId
    FROM   dbo.aspnet_Users
    WHERE  ApplicationId = @ApplicationId AND LoweredUserName = LOWER(@UserName)

    IF (@UserId IS NULL)
        RETURN
    SELECT TOP 1 PropertyNames, PropertyValuesString, PropertyValuesBinary
    FROM         dbo.aspnet_Profile
    WHERE        UserId = @UserId

    IF (@@ROWCOUNT > 0)
    BEGIN
        UPDATE dbo.aspnet_Users
        SET    LastActivityDate=@CurrentTimeUtc
        WHERE  UserId = @UserId
    END
END
GO

-- ----------------------------
-- Procedure structure for [dbo].[aspnet_Profile_SetProperties]
-- ----------------------------
DROP PROCEDURE [dbo].[aspnet_Profile_SetProperties]
GO

CREATE PROCEDURE [dbo].[aspnet_Profile_SetProperties]
    @ApplicationName        nvarchar(256),
    @PropertyNames          ntext,
    @PropertyValuesString   ntext,
    @PropertyValuesBinary   image,
    @UserName               nvarchar(256),
    @IsUserAnonymous        bit,
    @CurrentTimeUtc         datetime
AS
BEGIN
    DECLARE @ApplicationId uniqueidentifier
    SELECT  @ApplicationId = NULL

    DECLARE @ErrorCode     int
    SET @ErrorCode = 0

    DECLARE @TranStarted   bit
    SET @TranStarted = 0

    IF( @@TRANCOUNT = 0 )
    BEGIN
       BEGIN TRANSACTION
       SET @TranStarted = 1
    END
    ELSE
    	SET @TranStarted = 0

    EXEC dbo.aspnet_Applications_CreateApplication @ApplicationName, @ApplicationId OUTPUT

    IF( @@ERROR <> 0 )
    BEGIN
        SET @ErrorCode = -1
        GOTO Cleanup
    END

    DECLARE @UserId uniqueidentifier
    DECLARE @LastActivityDate datetime
    SELECT  @UserId = NULL
    SELECT  @LastActivityDate = @CurrentTimeUtc

    SELECT @UserId = UserId
    FROM   dbo.aspnet_Users
    WHERE  ApplicationId = @ApplicationId AND LoweredUserName = LOWER(@UserName)
    IF (@UserId IS NULL)
        EXEC dbo.aspnet_Users_CreateUser @ApplicationId, @UserName, @IsUserAnonymous, @LastActivityDate, @UserId OUTPUT

    IF( @@ERROR <> 0 )
    BEGIN
        SET @ErrorCode = -1
        GOTO Cleanup
    END

    UPDATE dbo.aspnet_Users
    SET    LastActivityDate=@CurrentTimeUtc
    WHERE  UserId = @UserId

    IF( @@ERROR <> 0 )
    BEGIN
        SET @ErrorCode = -1
        GOTO Cleanup
    END

    IF (EXISTS( SELECT *
               FROM   dbo.aspnet_Profile
               WHERE  UserId = @UserId))
        UPDATE dbo.aspnet_Profile
        SET    PropertyNames=@PropertyNames, PropertyValuesString = @PropertyValuesString,
               PropertyValuesBinary = @PropertyValuesBinary, LastUpdatedDate=@CurrentTimeUtc
        WHERE  UserId = @UserId
    ELSE
        INSERT INTO dbo.aspnet_Profile(UserId, PropertyNames, PropertyValuesString, PropertyValuesBinary, LastUpdatedDate)
             VALUES (@UserId, @PropertyNames, @PropertyValuesString, @PropertyValuesBinary, @CurrentTimeUtc)

    IF( @@ERROR <> 0 )
    BEGIN
        SET @ErrorCode = -1
        GOTO Cleanup
    END

    IF( @TranStarted = 1 )
    BEGIN
    	SET @TranStarted = 0
    	COMMIT TRANSACTION
    END

    RETURN 0

Cleanup:

    IF( @TranStarted = 1 )
    BEGIN
        SET @TranStarted = 0
    	ROLLBACK TRANSACTION
    END

    RETURN @ErrorCode

END
GO

-- ----------------------------
-- Procedure structure for [dbo].[aspnet_RegisterSchemaVersion]
-- ----------------------------
DROP PROCEDURE [dbo].[aspnet_RegisterSchemaVersion]
GO

CREATE PROCEDURE [dbo].[aspnet_RegisterSchemaVersion]
    @Feature                   nvarchar(128),
    @CompatibleSchemaVersion   nvarchar(128),
    @IsCurrentVersion          bit,
    @RemoveIncompatibleSchema  bit
AS
BEGIN
    IF( @RemoveIncompatibleSchema = 1 )
    BEGIN
        DELETE FROM dbo.aspnet_SchemaVersions WHERE Feature = LOWER( @Feature )
    END
    ELSE
    BEGIN
        IF( @IsCurrentVersion = 1 )
        BEGIN
            UPDATE dbo.aspnet_SchemaVersions
            SET IsCurrentVersion = 0
            WHERE Feature = LOWER( @Feature )
        END
    END

    INSERT  dbo.aspnet_SchemaVersions( Feature, CompatibleSchemaVersion, IsCurrentVersion )
    VALUES( LOWER( @Feature ), @CompatibleSchemaVersion, @IsCurrentVersion )
END
GO

-- ----------------------------
-- Procedure structure for [dbo].[aspnet_Roles_CreateRole]
-- ----------------------------
DROP PROCEDURE [dbo].[aspnet_Roles_CreateRole]
GO
CREATE PROCEDURE [dbo].[aspnet_Roles_CreateRole]
    @ApplicationName  nvarchar(256),
    @RoleName         nvarchar(256)
AS
BEGIN
    DECLARE @ApplicationId uniqueidentifier
    SELECT  @ApplicationId = NULL

    DECLARE @ErrorCode     int
    SET @ErrorCode = 0

    DECLARE @TranStarted   bit
    SET @TranStarted = 0

    IF( @@TRANCOUNT = 0 )
    BEGIN
        BEGIN TRANSACTION
        SET @TranStarted = 1
    END
    ELSE
        SET @TranStarted = 0

    EXEC dbo.aspnet_Applications_CreateApplication @ApplicationName, @ApplicationId OUTPUT

    IF( @@ERROR <> 0 )
    BEGIN
        SET @ErrorCode = -1
        GOTO Cleanup
    END

    IF (EXISTS(SELECT RoleId FROM dbo.aspnet_Roles WHERE LoweredRoleName = LOWER(@RoleName) AND ApplicationId = @ApplicationId))
    BEGIN
        SET @ErrorCode = 1
        GOTO Cleanup
    END

    INSERT INTO dbo.aspnet_Roles
                (ApplicationId, RoleName, LoweredRoleName)
         VALUES (@ApplicationId, @RoleName, LOWER(@RoleName))

    IF( @@ERROR <> 0 )
    BEGIN
        SET @ErrorCode = -1
        GOTO Cleanup
    END

    IF( @TranStarted = 1 )
    BEGIN
        SET @TranStarted = 0
        COMMIT TRANSACTION
    END

    RETURN(0)

Cleanup:

    IF( @TranStarted = 1 )
    BEGIN
        SET @TranStarted = 0
        ROLLBACK TRANSACTION
    END

    RETURN @ErrorCode

END
GO

-- ----------------------------
-- Procedure structure for [dbo].[aspnet_Roles_DeleteRole]
-- ----------------------------
DROP PROCEDURE [dbo].[aspnet_Roles_DeleteRole]
GO

CREATE PROCEDURE [dbo].[aspnet_Roles_DeleteRole]
    @ApplicationName            nvarchar(256),
    @RoleName                   nvarchar(256),
    @DeleteOnlyIfRoleIsEmpty    bit
AS
BEGIN
    DECLARE @ApplicationId uniqueidentifier
    SELECT  @ApplicationId = NULL
    SELECT  @ApplicationId = ApplicationId FROM aspnet_Applications WHERE LOWER(@ApplicationName) = LoweredApplicationName
    IF (@ApplicationId IS NULL)
        RETURN(1)

    DECLARE @ErrorCode     int
    SET @ErrorCode = 0

    DECLARE @TranStarted   bit
    SET @TranStarted = 0

    IF( @@TRANCOUNT = 0 )
    BEGIN
        BEGIN TRANSACTION
        SET @TranStarted = 1
    END
    ELSE
        SET @TranStarted = 0

    DECLARE @RoleId   uniqueidentifier
    SELECT  @RoleId = NULL
    SELECT  @RoleId = RoleId FROM dbo.aspnet_Roles WHERE LoweredRoleName = LOWER(@RoleName) AND ApplicationId = @ApplicationId

    IF (@RoleId IS NULL)
    BEGIN
        SELECT @ErrorCode = 1
        GOTO Cleanup
    END
    IF (@DeleteOnlyIfRoleIsEmpty <> 0)
    BEGIN
        IF (EXISTS (SELECT RoleId FROM dbo.aspnet_UsersInRoles  WHERE @RoleId = RoleId))
        BEGIN
            SELECT @ErrorCode = 2
            GOTO Cleanup
        END
    END


    DELETE FROM dbo.aspnet_UsersInRoles  WHERE @RoleId = RoleId

    IF( @@ERROR <> 0 )
    BEGIN
        SET @ErrorCode = -1
        GOTO Cleanup
    END

    DELETE FROM dbo.aspnet_Roles WHERE @RoleId = RoleId  AND ApplicationId = @ApplicationId

    IF( @@ERROR <> 0 )
    BEGIN
        SET @ErrorCode = -1
        GOTO Cleanup
    END

    IF( @TranStarted = 1 )
    BEGIN
        SET @TranStarted = 0
        COMMIT TRANSACTION
    END

    RETURN(0)

Cleanup:

    IF( @TranStarted = 1 )
    BEGIN
        SET @TranStarted = 0
        ROLLBACK TRANSACTION
    END

    RETURN @ErrorCode
END
GO

-- ----------------------------
-- Procedure structure for [dbo].[aspnet_Roles_GetAllRoles]
-- ----------------------------
DROP PROCEDURE [dbo].[aspnet_Roles_GetAllRoles]
GO

CREATE PROCEDURE [dbo].[aspnet_Roles_GetAllRoles] (
    @ApplicationName           nvarchar(256))
AS
BEGIN
    DECLARE @ApplicationId uniqueidentifier
    SELECT  @ApplicationId = NULL
    SELECT  @ApplicationId = ApplicationId FROM aspnet_Applications WHERE LOWER(@ApplicationName) = LoweredApplicationName
    IF (@ApplicationId IS NULL)
        RETURN
    SELECT RoleName
    FROM   dbo.aspnet_Roles WHERE ApplicationId = @ApplicationId
    ORDER BY RoleName
END
GO

-- ----------------------------
-- Procedure structure for [dbo].[aspnet_Roles_RoleExists]
-- ----------------------------
DROP PROCEDURE [dbo].[aspnet_Roles_RoleExists]
GO

CREATE PROCEDURE [dbo].[aspnet_Roles_RoleExists]
    @ApplicationName  nvarchar(256),
    @RoleName         nvarchar(256)
AS
BEGIN
    DECLARE @ApplicationId uniqueidentifier
    SELECT  @ApplicationId = NULL
    SELECT  @ApplicationId = ApplicationId FROM aspnet_Applications WHERE LOWER(@ApplicationName) = LoweredApplicationName
    IF (@ApplicationId IS NULL)
        RETURN(0)
    IF (EXISTS (SELECT RoleName FROM dbo.aspnet_Roles WHERE LOWER(@RoleName) = LoweredRoleName AND ApplicationId = @ApplicationId ))
        RETURN(1)
    ELSE
        RETURN(0)
END
GO

-- ----------------------------
-- Procedure structure for [dbo].[aspnet_Setup_RemoveAllRoleMembers]
-- ----------------------------
DROP PROCEDURE [dbo].[aspnet_Setup_RemoveAllRoleMembers]
GO

CREATE PROCEDURE [dbo].[aspnet_Setup_RemoveAllRoleMembers]
    @name   sysname
AS
BEGIN
    CREATE TABLE #aspnet_RoleMembers
    (
        Group_name      sysname,
        Group_id        smallint,
        Users_in_group  sysname,
        User_id         smallint
    )

    INSERT INTO #aspnet_RoleMembers
    EXEC sp_helpuser @name

    DECLARE @user_id smallint
    DECLARE @cmd nvarchar(500)
    DECLARE c1 cursor FORWARD_ONLY FOR
        SELECT User_id FROM #aspnet_RoleMembers

    OPEN c1

    FETCH c1 INTO @user_id
    WHILE (@@fetch_status = 0)
    BEGIN
        SET @cmd = 'EXEC sp_droprolemember ' + '''' + @name + ''', ''' + USER_NAME(@user_id) + ''''
        EXEC (@cmd)
        FETCH c1 INTO @user_id
    END

    CLOSE c1
    DEALLOCATE c1
END
GO

-- ----------------------------
-- Procedure structure for [dbo].[aspnet_Setup_RestorePermissions]
-- ----------------------------
DROP PROCEDURE [dbo].[aspnet_Setup_RestorePermissions]
GO

CREATE PROCEDURE [dbo].[aspnet_Setup_RestorePermissions]
    @name   sysname
AS
BEGIN
    DECLARE @object sysname
    DECLARE @protectType char(10)
    DECLARE @action varchar(60)
    DECLARE @grantee sysname
    DECLARE @cmd nvarchar(500)
    DECLARE c1 cursor FORWARD_ONLY FOR
        SELECT Object, ProtectType, [Action], Grantee FROM #aspnet_Permissions where Object = @name

    OPEN c1

    FETCH c1 INTO @object, @protectType, @action, @grantee
    WHILE (@@fetch_status = 0)
    BEGIN
        SET @cmd = @protectType + ' ' + @action + ' on ' + @object + ' TO [' + @grantee + ']'
        EXEC (@cmd)
        FETCH c1 INTO @object, @protectType, @action, @grantee
    END

    CLOSE c1
    DEALLOCATE c1
END
GO

-- ----------------------------
-- Procedure structure for [dbo].[aspnet_UnRegisterSchemaVersion]
-- ----------------------------
DROP PROCEDURE [dbo].[aspnet_UnRegisterSchemaVersion]
GO

CREATE PROCEDURE [dbo].[aspnet_UnRegisterSchemaVersion]
    @Feature                   nvarchar(128),
    @CompatibleSchemaVersion   nvarchar(128)
AS
BEGIN
    DELETE FROM dbo.aspnet_SchemaVersions
        WHERE   Feature = LOWER(@Feature) AND @CompatibleSchemaVersion = CompatibleSchemaVersion
END
GO

-- ----------------------------
-- Procedure structure for [dbo].[aspnet_Users_CreateUser]
-- ----------------------------
DROP PROCEDURE [dbo].[aspnet_Users_CreateUser]
GO

CREATE PROCEDURE [dbo].[aspnet_Users_CreateUser]
    @ApplicationId    uniqueidentifier,
    @UserName         nvarchar(256),
    @IsUserAnonymous  bit,
    @LastActivityDate DATETIME,
    @UserId           uniqueidentifier OUTPUT
AS
BEGIN
    IF( @UserId IS NULL )
        SELECT @UserId = NEWID()
    ELSE
    BEGIN
        IF( EXISTS( SELECT UserId FROM dbo.aspnet_Users
                    WHERE @UserId = UserId ) )
            RETURN -1
    END

    INSERT dbo.aspnet_Users (ApplicationId, UserId, UserName, LoweredUserName, IsAnonymous, LastActivityDate)
    VALUES (@ApplicationId, @UserId, @UserName, LOWER(@UserName), @IsUserAnonymous, @LastActivityDate)

    RETURN 0
END
GO

-- ----------------------------
-- Procedure structure for [dbo].[aspnet_Users_DeleteUser]
-- ----------------------------
DROP PROCEDURE [dbo].[aspnet_Users_DeleteUser]
GO
CREATE PROCEDURE [dbo].[aspnet_Users_DeleteUser]
    @ApplicationName  nvarchar(256),
    @UserName         nvarchar(256),
    @TablesToDeleteFrom int,
    @NumTablesDeletedFrom int OUTPUT
AS
BEGIN
    DECLARE @UserId               uniqueidentifier
    SELECT  @UserId               = NULL
    SELECT  @NumTablesDeletedFrom = 0

    DECLARE @TranStarted   bit
    SET @TranStarted = 0

    IF( @@TRANCOUNT = 0 )
    BEGIN
	    BEGIN TRANSACTION
	    SET @TranStarted = 1
    END
    ELSE
	SET @TranStarted = 0

    DECLARE @ErrorCode   int
    DECLARE @RowCount    int

    SET @ErrorCode = 0
    SET @RowCount  = 0

    SELECT  @UserId = u.UserId
    FROM    dbo.aspnet_Users u, dbo.aspnet_Applications a
    WHERE   u.LoweredUserName       = LOWER(@UserName)
        AND u.ApplicationId         = a.ApplicationId
        AND LOWER(@ApplicationName) = a.LoweredApplicationName

    IF (@UserId IS NULL)
    BEGIN
        GOTO Cleanup
    END

    -- Delete from Membership table if (@TablesToDeleteFrom & 1) is set
    IF ((@TablesToDeleteFrom & 1) <> 0 AND
        (EXISTS (SELECT name FROM sysobjects WHERE (name = N'vw_aspnet_MembershipUsers') AND (type = 'V'))))
    BEGIN
        DELETE FROM dbo.aspnet_Membership WHERE @UserId = UserId

        SELECT @ErrorCode = @@ERROR,
               @RowCount = @@ROWCOUNT

        IF( @ErrorCode <> 0 )
            GOTO Cleanup

        IF (@RowCount <> 0)
            SELECT  @NumTablesDeletedFrom = @NumTablesDeletedFrom + 1
    END

    -- Delete from aspnet_UsersInRoles table if (@TablesToDeleteFrom & 2) is set
    IF ((@TablesToDeleteFrom & 2) <> 0  AND
        (EXISTS (SELECT name FROM sysobjects WHERE (name = N'vw_aspnet_UsersInRoles') AND (type = 'V'))) )
    BEGIN
        DELETE FROM dbo.aspnet_UsersInRoles WHERE @UserId = UserId

        SELECT @ErrorCode = @@ERROR,
                @RowCount = @@ROWCOUNT

        IF( @ErrorCode <> 0 )
            GOTO Cleanup

        IF (@RowCount <> 0)
            SELECT  @NumTablesDeletedFrom = @NumTablesDeletedFrom + 1
    END

    -- Delete from aspnet_Profile table if (@TablesToDeleteFrom & 4) is set
    IF ((@TablesToDeleteFrom & 4) <> 0  AND
        (EXISTS (SELECT name FROM sysobjects WHERE (name = N'vw_aspnet_Profiles') AND (type = 'V'))) )
    BEGIN
        DELETE FROM dbo.aspnet_Profile WHERE @UserId = UserId

        SELECT @ErrorCode = @@ERROR,
                @RowCount = @@ROWCOUNT

        IF( @ErrorCode <> 0 )
            GOTO Cleanup

        IF (@RowCount <> 0)
            SELECT  @NumTablesDeletedFrom = @NumTablesDeletedFrom + 1
    END

    -- Delete from aspnet_PersonalizationPerUser table if (@TablesToDeleteFrom & 8) is set
    IF ((@TablesToDeleteFrom & 8) <> 0  AND
        (EXISTS (SELECT name FROM sysobjects WHERE (name = N'vw_aspnet_WebPartState_User') AND (type = 'V'))) )
    BEGIN
        DELETE FROM dbo.aspnet_PersonalizationPerUser WHERE @UserId = UserId

        SELECT @ErrorCode = @@ERROR,
                @RowCount = @@ROWCOUNT

        IF( @ErrorCode <> 0 )
            GOTO Cleanup

        IF (@RowCount <> 0)
            SELECT  @NumTablesDeletedFrom = @NumTablesDeletedFrom + 1
    END

    -- Delete from aspnet_Users table if (@TablesToDeleteFrom & 1,2,4 & 8) are all set
    IF ((@TablesToDeleteFrom & 1) <> 0 AND
        (@TablesToDeleteFrom & 2) <> 0 AND
        (@TablesToDeleteFrom & 4) <> 0 AND
        (@TablesToDeleteFrom & 8) <> 0 AND
        (EXISTS (SELECT UserId FROM dbo.aspnet_Users WHERE @UserId = UserId)))
    BEGIN
        DELETE FROM dbo.aspnet_Users WHERE @UserId = UserId

        SELECT @ErrorCode = @@ERROR,
                @RowCount = @@ROWCOUNT

        IF( @ErrorCode <> 0 )
            GOTO Cleanup

        IF (@RowCount <> 0)
            SELECT  @NumTablesDeletedFrom = @NumTablesDeletedFrom + 1
    END

    IF( @TranStarted = 1 )
    BEGIN
	    SET @TranStarted = 0
	    COMMIT TRANSACTION
    END

    RETURN 0

Cleanup:
    SET @NumTablesDeletedFrom = 0

    IF( @TranStarted = 1 )
    BEGIN
        SET @TranStarted = 0
	    ROLLBACK TRANSACTION
    END

    RETURN @ErrorCode

END
GO

-- ----------------------------
-- Procedure structure for [dbo].[aspnet_UsersInRoles_AddUsersToRoles]
-- ----------------------------
DROP PROCEDURE [dbo].[aspnet_UsersInRoles_AddUsersToRoles]
GO

CREATE PROCEDURE [dbo].[aspnet_UsersInRoles_AddUsersToRoles]
	@ApplicationName  nvarchar(256),
	@UserNames		  nvarchar(4000),
	@RoleNames		  nvarchar(4000),
	@CurrentTimeUtc   datetime
AS
BEGIN
	DECLARE @AppId uniqueidentifier
	SELECT  @AppId = NULL
	SELECT  @AppId = ApplicationId FROM aspnet_Applications WHERE LOWER(@ApplicationName) = LoweredApplicationName
	IF (@AppId IS NULL)
		RETURN(2)
	DECLARE @TranStarted   bit
	SET @TranStarted = 0

	IF( @@TRANCOUNT = 0 )
	BEGIN
		BEGIN TRANSACTION
		SET @TranStarted = 1
	END

	DECLARE @tbNames	table(Name nvarchar(256) NOT NULL PRIMARY KEY)
	DECLARE @tbRoles	table(RoleId uniqueidentifier NOT NULL PRIMARY KEY)
	DECLARE @tbUsers	table(UserId uniqueidentifier NOT NULL PRIMARY KEY)
	DECLARE @Num		int
	DECLARE @Pos		int
	DECLARE @NextPos	int
	DECLARE @Name		nvarchar(256)

	SET @Num = 0
	SET @Pos = 1
	WHILE(@Pos <= LEN(@RoleNames))
	BEGIN
		SELECT @NextPos = CHARINDEX(N',', @RoleNames,  @Pos)
		IF (@NextPos = 0 OR @NextPos IS NULL)
			SELECT @NextPos = LEN(@RoleNames) + 1
		SELECT @Name = RTRIM(LTRIM(SUBSTRING(@RoleNames, @Pos, @NextPos - @Pos)))
		SELECT @Pos = @NextPos+1

		INSERT INTO @tbNames VALUES (@Name)
		SET @Num = @Num + 1
	END

	INSERT INTO @tbRoles
	  SELECT RoleId
	  FROM   dbo.aspnet_Roles ar, @tbNames t
	  WHERE  LOWER(t.Name) = ar.LoweredRoleName AND ar.ApplicationId = @AppId

	IF (@@ROWCOUNT <> @Num)
	BEGIN
		SELECT TOP 1 Name
		FROM   @tbNames
		WHERE  LOWER(Name) NOT IN (SELECT ar.LoweredRoleName FROM dbo.aspnet_Roles ar,  @tbRoles r WHERE r.RoleId = ar.RoleId)
		IF( @TranStarted = 1 )
			ROLLBACK TRANSACTION
		RETURN(2)
	END

	DELETE FROM @tbNames WHERE 1=1
	SET @Num = 0
	SET @Pos = 1

	WHILE(@Pos <= LEN(@UserNames))
	BEGIN
		SELECT @NextPos = CHARINDEX(N',', @UserNames,  @Pos)
		IF (@NextPos = 0 OR @NextPos IS NULL)
			SELECT @NextPos = LEN(@UserNames) + 1
		SELECT @Name = RTRIM(LTRIM(SUBSTRING(@UserNames, @Pos, @NextPos - @Pos)))
		SELECT @Pos = @NextPos+1

		INSERT INTO @tbNames VALUES (@Name)
		SET @Num = @Num + 1
	END

	INSERT INTO @tbUsers
	  SELECT UserId
	  FROM   dbo.aspnet_Users ar, @tbNames t
	  WHERE  LOWER(t.Name) = ar.LoweredUserName AND ar.ApplicationId = @AppId

	IF (@@ROWCOUNT <> @Num)
	BEGIN
		DELETE FROM @tbNames
		WHERE LOWER(Name) IN (SELECT LoweredUserName FROM dbo.aspnet_Users au,  @tbUsers u WHERE au.UserId = u.UserId)

		INSERT dbo.aspnet_Users (ApplicationId, UserId, UserName, LoweredUserName, IsAnonymous, LastActivityDate)
		  SELECT @AppId, NEWID(), Name, LOWER(Name), 0, @CurrentTimeUtc
		  FROM   @tbNames

		INSERT INTO @tbUsers
		  SELECT  UserId
		  FROM	dbo.aspnet_Users au, @tbNames t
		  WHERE   LOWER(t.Name) = au.LoweredUserName AND au.ApplicationId = @AppId
	END

	IF (EXISTS (SELECT * FROM dbo.aspnet_UsersInRoles ur, @tbUsers tu, @tbRoles tr WHERE tu.UserId = ur.UserId AND tr.RoleId = ur.RoleId))
	BEGIN
		SELECT TOP 1 UserName, RoleName
		FROM		 dbo.aspnet_UsersInRoles ur, @tbUsers tu, @tbRoles tr, aspnet_Users u, aspnet_Roles r
		WHERE		u.UserId = tu.UserId AND r.RoleId = tr.RoleId AND tu.UserId = ur.UserId AND tr.RoleId = ur.RoleId

		IF( @TranStarted = 1 )
			ROLLBACK TRANSACTION
		RETURN(3)
	END

	INSERT INTO dbo.aspnet_UsersInRoles (UserId, RoleId)
	SELECT UserId, RoleId
	FROM @tbUsers, @tbRoles

	IF( @TranStarted = 1 )
		COMMIT TRANSACTION
	RETURN(0)
END                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
GO

-- ----------------------------
-- Procedure structure for [dbo].[aspnet_UsersInRoles_FindUsersInRole]
-- ----------------------------
DROP PROCEDURE [dbo].[aspnet_UsersInRoles_FindUsersInRole]
GO

CREATE PROCEDURE [dbo].[aspnet_UsersInRoles_FindUsersInRole]
    @ApplicationName  nvarchar(256),
    @RoleName         nvarchar(256),
    @UserNameToMatch  nvarchar(256)
AS
BEGIN
    DECLARE @ApplicationId uniqueidentifier
    SELECT  @ApplicationId = NULL
    SELECT  @ApplicationId = ApplicationId FROM aspnet_Applications WHERE LOWER(@ApplicationName) = LoweredApplicationName
    IF (@ApplicationId IS NULL)
        RETURN(1)
     DECLARE @RoleId uniqueidentifier
     SELECT  @RoleId = NULL

     SELECT  @RoleId = RoleId
     FROM    dbo.aspnet_Roles
     WHERE   LOWER(@RoleName) = LoweredRoleName AND ApplicationId = @ApplicationId

     IF (@RoleId IS NULL)
         RETURN(1)

    SELECT u.UserName
    FROM   dbo.aspnet_Users u, dbo.aspnet_UsersInRoles ur
    WHERE  u.UserId = ur.UserId AND @RoleId = ur.RoleId AND u.ApplicationId = @ApplicationId AND LoweredUserName LIKE LOWER(@UserNameToMatch)
    ORDER BY u.UserName
    RETURN(0)
END
GO

-- ----------------------------
-- Procedure structure for [dbo].[aspnet_UsersInRoles_GetRolesForUser]
-- ----------------------------
DROP PROCEDURE [dbo].[aspnet_UsersInRoles_GetRolesForUser]
GO

CREATE PROCEDURE [dbo].[aspnet_UsersInRoles_GetRolesForUser]
    @ApplicationName  nvarchar(256),
    @UserName         nvarchar(256)
AS
BEGIN
    DECLARE @ApplicationId uniqueidentifier
    SELECT  @ApplicationId = NULL
    SELECT  @ApplicationId = ApplicationId FROM aspnet_Applications WHERE LOWER(@ApplicationName) = LoweredApplicationName
    IF (@ApplicationId IS NULL)
        RETURN(1)
    DECLARE @UserId uniqueidentifier
    SELECT  @UserId = NULL

    SELECT  @UserId = UserId
    FROM    dbo.aspnet_Users
    WHERE   LoweredUserName = LOWER(@UserName) AND ApplicationId = @ApplicationId

    IF (@UserId IS NULL)
        RETURN(1)

    SELECT r.RoleName
    FROM   dbo.aspnet_Roles r, dbo.aspnet_UsersInRoles ur
    WHERE  r.RoleId = ur.RoleId AND r.ApplicationId = @ApplicationId AND ur.UserId = @UserId
    ORDER BY r.RoleName
    RETURN (0)
END
GO

-- ----------------------------
-- Procedure structure for [dbo].[aspnet_UsersInRoles_GetUsersInRoles]
-- ----------------------------
DROP PROCEDURE [dbo].[aspnet_UsersInRoles_GetUsersInRoles]
GO

CREATE PROCEDURE [dbo].[aspnet_UsersInRoles_GetUsersInRoles]
    @ApplicationName  nvarchar(256),
    @RoleName         nvarchar(256)
AS
BEGIN
    DECLARE @ApplicationId uniqueidentifier
    SELECT  @ApplicationId = NULL
    SELECT  @ApplicationId = ApplicationId FROM aspnet_Applications WHERE LOWER(@ApplicationName) = LoweredApplicationName
    IF (@ApplicationId IS NULL)
        RETURN(1)
     DECLARE @RoleId uniqueidentifier
     SELECT  @RoleId = NULL

     SELECT  @RoleId = RoleId
     FROM    dbo.aspnet_Roles
     WHERE   LOWER(@RoleName) = LoweredRoleName AND ApplicationId = @ApplicationId

     IF (@RoleId IS NULL)
         RETURN(1)

    SELECT u.UserName
    FROM   dbo.aspnet_Users u, dbo.aspnet_UsersInRoles ur
    WHERE  u.UserId = ur.UserId AND @RoleId = ur.RoleId AND u.ApplicationId = @ApplicationId
    ORDER BY u.UserName
    RETURN(0)
END
GO

-- ----------------------------
-- Procedure structure for [dbo].[aspnet_UsersInRoles_IsUserInRole]
-- ----------------------------
DROP PROCEDURE [dbo].[aspnet_UsersInRoles_IsUserInRole]
GO

CREATE PROCEDURE [dbo].[aspnet_UsersInRoles_IsUserInRole]
    @ApplicationName  nvarchar(256),
    @UserName         nvarchar(256),
    @RoleName         nvarchar(256)
AS
BEGIN
    DECLARE @ApplicationId uniqueidentifier
    SELECT  @ApplicationId = NULL
    SELECT  @ApplicationId = ApplicationId FROM aspnet_Applications WHERE LOWER(@ApplicationName) = LoweredApplicationName
    IF (@ApplicationId IS NULL)
        RETURN(2)
    DECLARE @UserId uniqueidentifier
    SELECT  @UserId = NULL
    DECLARE @RoleId uniqueidentifier
    SELECT  @RoleId = NULL

    SELECT  @UserId = UserId
    FROM    dbo.aspnet_Users
    WHERE   LoweredUserName = LOWER(@UserName) AND ApplicationId = @ApplicationId

    IF (@UserId IS NULL)
        RETURN(2)

    SELECT  @RoleId = RoleId
    FROM    dbo.aspnet_Roles
    WHERE   LoweredRoleName = LOWER(@RoleName) AND ApplicationId = @ApplicationId

    IF (@RoleId IS NULL)
        RETURN(3)

    IF (EXISTS( SELECT * FROM dbo.aspnet_UsersInRoles WHERE  UserId = @UserId AND RoleId = @RoleId))
        RETURN(1)
    ELSE
        RETURN(0)
END
GO

-- ----------------------------
-- Procedure structure for [dbo].[aspnet_UsersInRoles_RemoveUsersFromRoles]
-- ----------------------------
DROP PROCEDURE [dbo].[aspnet_UsersInRoles_RemoveUsersFromRoles]
GO

CREATE PROCEDURE [dbo].[aspnet_UsersInRoles_RemoveUsersFromRoles]
	@ApplicationName  nvarchar(256),
	@UserNames		  nvarchar(4000),
	@RoleNames		  nvarchar(4000)
AS
BEGIN
	DECLARE @AppId uniqueidentifier
	SELECT  @AppId = NULL
	SELECT  @AppId = ApplicationId FROM aspnet_Applications WHERE LOWER(@ApplicationName) = LoweredApplicationName
	IF (@AppId IS NULL)
		RETURN(2)


	DECLARE @TranStarted   bit
	SET @TranStarted = 0

	IF( @@TRANCOUNT = 0 )
	BEGIN
		BEGIN TRANSACTION
		SET @TranStarted = 1
	END

	DECLARE @tbNames  table(Name nvarchar(256) NOT NULL PRIMARY KEY)
	DECLARE @tbRoles  table(RoleId uniqueidentifier NOT NULL PRIMARY KEY)
	DECLARE @tbUsers  table(UserId uniqueidentifier NOT NULL PRIMARY KEY)
	DECLARE @Num	  int
	DECLARE @Pos	  int
	DECLARE @NextPos  int
	DECLARE @Name	  nvarchar(256)
	DECLARE @CountAll int
	DECLARE @CountU	  int
	DECLARE @CountR	  int


	SET @Num = 0
	SET @Pos = 1
	WHILE(@Pos <= LEN(@RoleNames))
	BEGIN
		SELECT @NextPos = CHARINDEX(N',', @RoleNames,  @Pos)
		IF (@NextPos = 0 OR @NextPos IS NULL)
			SELECT @NextPos = LEN(@RoleNames) + 1
		SELECT @Name = RTRIM(LTRIM(SUBSTRING(@RoleNames, @Pos, @NextPos - @Pos)))
		SELECT @Pos = @NextPos+1

		INSERT INTO @tbNames VALUES (@Name)
		SET @Num = @Num + 1
	END

	INSERT INTO @tbRoles
	  SELECT RoleId
	  FROM   dbo.aspnet_Roles ar, @tbNames t
	  WHERE  LOWER(t.Name) = ar.LoweredRoleName AND ar.ApplicationId = @AppId
	SELECT @CountR = @@ROWCOUNT

	IF (@CountR <> @Num)
	BEGIN
		SELECT TOP 1 N'', Name
		FROM   @tbNames
		WHERE  LOWER(Name) NOT IN (SELECT ar.LoweredRoleName FROM dbo.aspnet_Roles ar,  @tbRoles r WHERE r.RoleId = ar.RoleId)
		IF( @TranStarted = 1 )
			ROLLBACK TRANSACTION
		RETURN(2)
	END


	DELETE FROM @tbNames WHERE 1=1
	SET @Num = 0
	SET @Pos = 1


	WHILE(@Pos <= LEN(@UserNames))
	BEGIN
		SELECT @NextPos = CHARINDEX(N',', @UserNames,  @Pos)
		IF (@NextPos = 0 OR @NextPos IS NULL)
			SELECT @NextPos = LEN(@UserNames) + 1
		SELECT @Name = RTRIM(LTRIM(SUBSTRING(@UserNames, @Pos, @NextPos - @Pos)))
		SELECT @Pos = @NextPos+1

		INSERT INTO @tbNames VALUES (@Name)
		SET @Num = @Num + 1
	END

	INSERT INTO @tbUsers
	  SELECT UserId
	  FROM   dbo.aspnet_Users ar, @tbNames t
	  WHERE  LOWER(t.Name) = ar.LoweredUserName AND ar.ApplicationId = @AppId

	SELECT @CountU = @@ROWCOUNT
	IF (@CountU <> @Num)
	BEGIN
		SELECT TOP 1 Name, N''
		FROM   @tbNames
		WHERE  LOWER(Name) NOT IN (SELECT au.LoweredUserName FROM dbo.aspnet_Users au,  @tbUsers u WHERE u.UserId = au.UserId)

		IF( @TranStarted = 1 )
			ROLLBACK TRANSACTION
		RETURN(1)
	END

	SELECT  @CountAll = COUNT(*)
	FROM	dbo.aspnet_UsersInRoles ur, @tbUsers u, @tbRoles r
	WHERE   ur.UserId = u.UserId AND ur.RoleId = r.RoleId

	IF (@CountAll <> @CountU * @CountR)
	BEGIN
		SELECT TOP 1 UserName, RoleName
		FROM		 @tbUsers tu, @tbRoles tr, dbo.aspnet_Users u, dbo.aspnet_Roles r
		WHERE		 u.UserId = tu.UserId AND r.RoleId = tr.RoleId AND
					 tu.UserId NOT IN (SELECT ur.UserId FROM dbo.aspnet_UsersInRoles ur WHERE ur.RoleId = tr.RoleId) AND
					 tr.RoleId NOT IN (SELECT ur.RoleId FROM dbo.aspnet_UsersInRoles ur WHERE ur.UserId = tu.UserId)
		IF( @TranStarted = 1 )
			ROLLBACK TRANSACTION
		RETURN(3)
	END

	DELETE FROM dbo.aspnet_UsersInRoles
	WHERE UserId IN (SELECT UserId FROM @tbUsers)
	  AND RoleId IN (SELECT RoleId FROM @tbRoles)
	IF( @TranStarted = 1 )
		COMMIT TRANSACTION
	RETURN(0)
END
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
GO

-- ----------------------------
-- Procedure structure for [dbo].[aspnet_WebEvent_LogEvent]
-- ----------------------------
DROP PROCEDURE [dbo].[aspnet_WebEvent_LogEvent]
GO
CREATE PROCEDURE [dbo].[aspnet_WebEvent_LogEvent]
        @EventId         char(32),
        @EventTimeUtc    datetime,
        @EventTime       datetime,
        @EventType       nvarchar(256),
        @EventSequence   decimal(19,0),
        @EventOccurrence decimal(19,0),
        @EventCode       int,
        @EventDetailCode int,
        @Message         nvarchar(1024),
        @ApplicationPath nvarchar(256),
        @ApplicationVirtualPath nvarchar(256),
        @MachineName    nvarchar(256),
        @RequestUrl      nvarchar(1024),
        @ExceptionType   nvarchar(256),
        @Details         ntext
AS
BEGIN
    INSERT
        dbo.aspnet_WebEvent_Events
        (
            EventId,
            EventTimeUtc,
            EventTime,
            EventType,
            EventSequence,
            EventOccurrence,
            EventCode,
            EventDetailCode,
            Message,
            ApplicationPath,
            ApplicationVirtualPath,
            MachineName,
            RequestUrl,
            ExceptionType,
            Details
        )
    VALUES
    (
        @EventId,
        @EventTimeUtc,
        @EventTime,
        @EventType,
        @EventSequence,
        @EventOccurrence,
        @EventCode,
        @EventDetailCode,
        @Message,
        @ApplicationPath,
        @ApplicationVirtualPath,
        @MachineName,
        @RequestUrl,
        @ExceptionType,
        @Details
    )
END
GO

-- ----------------------------
-- Procedure structure for [dbo].[SP_ADMAreaPS_SelectAll]
-- ----------------------------
DROP PROCEDURE [dbo].[SP_ADMAreaPS_SelectAll]
GO
-- =============================================
-- Author:		Jayanta Kumar Das
-- Create date: 10 NOV 2012
-- Description:	<Description,,>
-- =============================================
CREATE PROCEDURE [dbo].[SP_ADMAreaPS_SelectAll] 
AS
BEGIN
    DECLARE @Count int
    SELECT  @Count = COUNT([AreaPSID])
    FROM    dbo.ADMAreaPS

    IF (@Count > 0)
		BEGIN
		SELECT [AreaPSID]
			  ,[DistrictID]
			  ,[AreaPSCode]
			  ,[AreaPSName]
			  ,[Description]
			  ,[CreatedBy]
			  ,[CreatedDate]
			  ,[ModifiedBy]
			  ,[ModifiedDate]
		FROM [SMMS].[dbo].[ADMAreaPS]
		END
END

GO

-- ----------------------------
-- Procedure structure for [dbo].[SP_ADMAreaPS_SelectByDistrictID]
-- ----------------------------
DROP PROCEDURE [dbo].[SP_ADMAreaPS_SelectByDistrictID]
GO
-- =============================================
-- Author:		Jayanta Kumar Das
-- Create date: 10 NOV 2012
-- Description:	<Description,,>
-- =============================================
CREATE PROCEDURE [dbo].[SP_ADMAreaPS_SelectByDistrictID] 
	@DistrictID int
AS
BEGIN
    DECLARE @Count int
    SELECT  @Count = COUNT([AreaPSID])
    FROM    dbo.ADMAreaPS
    WHERE   [DistrictID] = @DistrictID

    IF (@Count > 0)
		BEGIN
		SELECT [AreaPSID]
			  ,[DistrictID]
			  ,[AreaPSCode]
			  ,[AreaPSName]
			  ,[Description]
			  ,[CreatedBy]
			  ,[CreatedDate]
			  ,[ModifiedBy]
			  ,[ModifiedDate]
		FROM [SMMS].[dbo].[ADMAreaPS]
		WHERE   [DistrictID] = @DistrictID
		END
END

GO

-- ----------------------------
-- Procedure structure for [dbo].[SP_ADMAreaPS_SelectByID]
-- ----------------------------
DROP PROCEDURE [dbo].[SP_ADMAreaPS_SelectByID]
GO
-- =============================================
-- Author:		Jayanta Kumar Das
-- Create date: 10 NOV 2012
-- Description:	<Description,,>
-- =============================================
CREATE PROCEDURE [dbo].[SP_ADMAreaPS_SelectByID] 
	@AreaPSID int
AS
BEGIN
    DECLARE @Count int
    SELECT  @Count = COUNT([AreaPSID])
    FROM    dbo.ADMAreaPS
    WHERE   [AreaPSID] = @AreaPSID

    IF (@Count > 0)
		BEGIN
		SELECT [AreaPSID]
			  ,[DistrictID]
			  ,[AreaPSCode]
			  ,[AreaPSName]
			  ,[Description]
			  ,[CreatedBy]
			  ,[CreatedDate]
			  ,[ModifiedBy]
			  ,[ModifiedDate]
		FROM [SMMS].[dbo].[ADMAreaPS]
		WHERE   [AreaPSID] = @AreaPSID
		END
END

GO

-- ----------------------------
-- Procedure structure for [dbo].[SP_ADMAreaPS_SelectByName]
-- ----------------------------
DROP PROCEDURE [dbo].[SP_ADMAreaPS_SelectByName]
GO
-- =============================================
-- Author:		Jayanta Kumar Das
-- Create date: 10 NOV 2012
-- Description:	<Description,,>
-- =============================================
CREATE PROCEDURE [dbo].[SP_ADMAreaPS_SelectByName] 
	@AreaPSName nvarchar(64)
AS
BEGIN
    DECLARE @Count int
    SELECT  @Count = COUNT([AreaPSID])
    FROM    dbo.ADMAreaPS
    WHERE   [AreaPSName] LIKE '%' + @AreaPSName + '%'

    IF (@Count > 0)
		BEGIN
		SELECT [AreaPSID]
			  ,[DistrictID]
			  ,[AreaPSCode]
			  ,[AreaPSName]
			  ,[Description]
			  ,[CreatedBy]
			  ,[CreatedDate]
			  ,[ModifiedBy]
			  ,[ModifiedDate]
		FROM [SMMS].[dbo].[ADMAreaPS]
		WHERE   [AreaPSName] LIKE '%' + @AreaPSName + '%'
		END
END

GO

-- ----------------------------
-- Procedure structure for [dbo].[SP_ADMAreaPS_Update]
-- ----------------------------
DROP PROCEDURE [dbo].[SP_ADMAreaPS_Update]
GO
-- =============================================
-- Author:		Jayanta Kumar Das
-- Create date: 10 NOV 2012
-- Description:	<Description,,>
-- =============================================
CREATE PROCEDURE [dbo].[SP_ADMAreaPS_Update] 
	@AreaPSID int,
	@DistrictID int,
	@AreaPSCode nvarchar(12),
	@AreaPSName nvarchar(64),
	@Description nvarchar(max)
AS
BEGIN
    DECLARE @Count int
    SELECT  @Count = COUNT([AreaPSID])
    FROM    dbo.ADMAreaPS
    WHERE   [AreaPSID] = @AreaPSID

    IF (@Count = 0)
		BEGIN
		INSERT INTO [SMMS].[dbo].[ADMAreaPS]
			   ([DistrictID]
			   ,[AreaPSCode]
			   ,[AreaPSName]
			   ,[Description])
		VALUES
			   (@DistrictID
			   ,@AreaPSCode
			   ,@AreaPSName
			   ,@Description)
		END
	ELSE
		BEGIN
		UPDATE [SMMS].[dbo].[ADMAreaPS]
		SET [DistrictID] = @DistrictID
			  ,[AreaPSCode] = @AreaPSCode
			  ,[AreaPSName] = @AreaPSName
			  ,[Description] = @Description
		WHERE [AreaPSID] = @AreaPSID
		END
END

GO

-- ----------------------------
-- Indexes structure for table ACCAccount
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[ACCAccount]
-- ----------------------------
ALTER TABLE [dbo].[ACCAccount] ADD PRIMARY KEY ([AccountID])
GO

-- ----------------------------
-- Indexes structure for table ACCAccountDetails
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[ACCAccountDetails]
-- ----------------------------
ALTER TABLE [dbo].[ACCAccountDetails] ADD PRIMARY KEY ([AccountDetailsID])
GO

-- ----------------------------
-- Indexes structure for table ACCAccountSubtype
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[ACCAccountSubtype]
-- ----------------------------
ALTER TABLE [dbo].[ACCAccountSubtype] ADD PRIMARY KEY ([AccountSubtypeID])
GO

-- ----------------------------
-- Indexes structure for table ACCAccountType
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[ACCAccountType]
-- ----------------------------
ALTER TABLE [dbo].[ACCAccountType] ADD PRIMARY KEY ([AccountTypeID])
GO

-- ----------------------------
-- Indexes structure for table ACCAccountUpdate
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[ACCAccountUpdate]
-- ----------------------------
ALTER TABLE [dbo].[ACCAccountUpdate] ADD PRIMARY KEY ([AccountUpdateID])
GO

-- ----------------------------
-- Indexes structure for table ACCBank
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[ACCBank]
-- ----------------------------
ALTER TABLE [dbo].[ACCBank] ADD PRIMARY KEY ([BankID])
GO

-- ----------------------------
-- Indexes structure for table ACCBillsPaid
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[ACCBillsPaid]
-- ----------------------------
ALTER TABLE [dbo].[ACCBillsPaid] ADD PRIMARY KEY ([BillsPaidID])
GO

-- ----------------------------
-- Indexes structure for table ACCBillsPayable
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[ACCBillsPayable]
-- ----------------------------
ALTER TABLE [dbo].[ACCBillsPayable] ADD PRIMARY KEY ([BillsPayableID])
GO

-- ----------------------------
-- Indexes structure for table ACCBillsReceivable
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[ACCBillsReceivable]
-- ----------------------------
ALTER TABLE [dbo].[ACCBillsReceivable] ADD PRIMARY KEY ([BillsReceivableID])
GO

-- ----------------------------
-- Indexes structure for table ACCBillsReceived
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[ACCBillsReceived]
-- ----------------------------
ALTER TABLE [dbo].[ACCBillsReceived] ADD PRIMARY KEY ([BillsReceivedID])
GO

-- ----------------------------
-- Indexes structure for table ACCChequePaid
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[ACCChequePaid]
-- ----------------------------
ALTER TABLE [dbo].[ACCChequePaid] ADD PRIMARY KEY ([ChequePaidID])
GO

-- ----------------------------
-- Indexes structure for table ACCChequeReceived
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[ACCChequeReceived]
-- ----------------------------
ALTER TABLE [dbo].[ACCChequeReceived] ADD PRIMARY KEY ([ChequeReceivedID])
GO

-- ----------------------------
-- Indexes structure for table ACCFiscalPeriod
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[ACCFiscalPeriod]
-- ----------------------------
ALTER TABLE [dbo].[ACCFiscalPeriod] ADD PRIMARY KEY ([PeriodID])
GO

-- ----------------------------
-- Indexes structure for table ACCJournal
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[ACCJournal]
-- ----------------------------
ALTER TABLE [dbo].[ACCJournal] ADD PRIMARY KEY ([JournalID])
GO

-- ----------------------------
-- Indexes structure for table ACCLedger
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[ACCLedger]
-- ----------------------------
ALTER TABLE [dbo].[ACCLedger] ADD PRIMARY KEY ([LedgerID])
GO

-- ----------------------------
-- Indexes structure for table ACCTransaction
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[ACCTransaction]
-- ----------------------------
ALTER TABLE [dbo].[ACCTransaction] ADD PRIMARY KEY ([TransactionID])
GO

-- ----------------------------
-- Indexes structure for table ACCTransactionUpdate
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[ACCTransactionUpdate]
-- ----------------------------
ALTER TABLE [dbo].[ACCTransactionUpdate] ADD PRIMARY KEY ([TransactionID])
GO

-- ----------------------------
-- Indexes structure for table ACCVoucher
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[ACCVoucher]
-- ----------------------------
ALTER TABLE [dbo].[ACCVoucher] ADD PRIMARY KEY ([VoucherID])
GO

-- ----------------------------
-- Indexes structure for table ACCVoucherLink
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[ACCVoucherLink]
-- ----------------------------
ALTER TABLE [dbo].[ACCVoucherLink] ADD PRIMARY KEY ([VoucherLinkID])
GO

-- ----------------------------
-- Indexes structure for table ACCVoucherUpdate
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[ACCVoucherUpdate]
-- ----------------------------
ALTER TABLE [dbo].[ACCVoucherUpdate] ADD PRIMARY KEY ([VoucherUpdateID])
GO

-- ----------------------------
-- Indexes structure for table ADMAreaPO
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[ADMAreaPO]
-- ----------------------------
ALTER TABLE [dbo].[ADMAreaPO] ADD PRIMARY KEY ([AreaPOID])
GO

-- ----------------------------
-- Indexes structure for table ADMAreaVillage
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[ADMAreaVillage]
-- ----------------------------
ALTER TABLE [dbo].[ADMAreaVillage] ADD PRIMARY KEY ([AreaVillageID])
GO

-- ----------------------------
-- Indexes structure for table ADMChamber
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[ADMChamber]
-- ----------------------------
ALTER TABLE [dbo].[ADMChamber] ADD PRIMARY KEY ([ChamberID])
GO

-- ----------------------------
-- Indexes structure for table ADMCompany
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[ADMCompany]
-- ----------------------------
ALTER TABLE [dbo].[ADMCompany] ADD PRIMARY KEY ([CompanyID])
GO

-- ----------------------------
-- Indexes structure for table ADMCountry
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[ADMCountry]
-- ----------------------------
ALTER TABLE [dbo].[ADMCountry] ADD PRIMARY KEY ([CountryID])
GO

-- ----------------------------
-- Indexes structure for table ADMDistrict
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[ADMDistrict]
-- ----------------------------
ALTER TABLE [dbo].[ADMDistrict] ADD PRIMARY KEY ([DistrictID])
GO

-- ----------------------------
-- Indexes structure for table ADMDivision
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[ADMDivision]
-- ----------------------------
ALTER TABLE [dbo].[ADMDivision] ADD PRIMARY KEY ([DivisionID])
GO

-- ----------------------------
-- Indexes structure for table ADMPermission
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[ADMPermission]
-- ----------------------------
ALTER TABLE [dbo].[ADMPermission] ADD PRIMARY KEY ([PermissionID])
GO

-- ----------------------------
-- Indexes structure for table ADMUnit
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[ADMUnit]
-- ----------------------------
ALTER TABLE [dbo].[ADMUnit] ADD PRIMARY KEY ([UnitID])
GO

-- ----------------------------
-- Indexes structure for table ADMUnitCoversion
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[ADMUnitCoversion]
-- ----------------------------
ALTER TABLE [dbo].[ADMUnitCoversion] ADD PRIMARY KEY ([UnitConvID])
GO

-- ----------------------------
-- Indexes structure for table ADMUpazilaPS
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[ADMUpazilaPS]
-- ----------------------------
ALTER TABLE [dbo].[ADMUpazilaPS] ADD PRIMARY KEY ([UpazilaPSID])
GO

-- ----------------------------
-- Indexes structure for table aspnet_Applications
-- ----------------------------
CREATE CLUSTERED INDEX [aspnet_Applications_Index] ON [dbo].[aspnet_Applications]
([LoweredApplicationName] ASC) 
GO

-- ----------------------------
-- Primary Key structure for table [dbo].[aspnet_Applications]
-- ----------------------------
ALTER TABLE [dbo].[aspnet_Applications] ADD PRIMARY KEY NONCLUSTERED ([ApplicationId])
GO

-- ----------------------------
-- Uniques structure for table [dbo].[aspnet_Applications]
-- ----------------------------
ALTER TABLE [dbo].[aspnet_Applications] ADD UNIQUE ([ApplicationName] ASC)
GO
ALTER TABLE [dbo].[aspnet_Applications] ADD UNIQUE ([LoweredApplicationName] ASC)
GO

-- ----------------------------
-- Indexes structure for table aspnet_Membership
-- ----------------------------
CREATE CLUSTERED INDEX [aspnet_Membership_index] ON [dbo].[aspnet_Membership]
([ApplicationId] ASC, [LoweredEmail] ASC) 
GO

-- ----------------------------
-- Primary Key structure for table [dbo].[aspnet_Membership]
-- ----------------------------
ALTER TABLE [dbo].[aspnet_Membership] ADD PRIMARY KEY NONCLUSTERED ([UserId])
GO

-- ----------------------------
-- Indexes structure for table aspnet_Paths
-- ----------------------------
CREATE UNIQUE CLUSTERED INDEX [aspnet_Paths_index] ON [dbo].[aspnet_Paths]
([ApplicationId] ASC, [LoweredPath] ASC) 
GO

-- ----------------------------
-- Primary Key structure for table [dbo].[aspnet_Paths]
-- ----------------------------
ALTER TABLE [dbo].[aspnet_Paths] ADD PRIMARY KEY NONCLUSTERED ([PathId])
GO

-- ----------------------------
-- Indexes structure for table aspnet_PersonalizationAllUsers
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[aspnet_PersonalizationAllUsers]
-- ----------------------------
ALTER TABLE [dbo].[aspnet_PersonalizationAllUsers] ADD PRIMARY KEY ([PathId])
GO

-- ----------------------------
-- Indexes structure for table aspnet_PersonalizationPerUser
-- ----------------------------
CREATE UNIQUE CLUSTERED INDEX [aspnet_PersonalizationPerUser_index1] ON [dbo].[aspnet_PersonalizationPerUser]
([PathId] ASC, [UserId] ASC) 
GO
CREATE UNIQUE INDEX [aspnet_PersonalizationPerUser_ncindex2] ON [dbo].[aspnet_PersonalizationPerUser]
([UserId] ASC, [PathId] ASC) 
GO

-- ----------------------------
-- Primary Key structure for table [dbo].[aspnet_PersonalizationPerUser]
-- ----------------------------
ALTER TABLE [dbo].[aspnet_PersonalizationPerUser] ADD PRIMARY KEY NONCLUSTERED ([Id])
GO

-- ----------------------------
-- Indexes structure for table aspnet_Profile
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[aspnet_Profile]
-- ----------------------------
ALTER TABLE [dbo].[aspnet_Profile] ADD PRIMARY KEY ([UserId])
GO

-- ----------------------------
-- Indexes structure for table aspnet_Roles
-- ----------------------------
CREATE UNIQUE CLUSTERED INDEX [aspnet_Roles_index1] ON [dbo].[aspnet_Roles]
([ApplicationId] ASC, [LoweredRoleName] ASC) 
GO

-- ----------------------------
-- Primary Key structure for table [dbo].[aspnet_Roles]
-- ----------------------------
ALTER TABLE [dbo].[aspnet_Roles] ADD PRIMARY KEY NONCLUSTERED ([RoleId])
GO

-- ----------------------------
-- Indexes structure for table aspnet_SchemaVersions
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[aspnet_SchemaVersions]
-- ----------------------------
ALTER TABLE [dbo].[aspnet_SchemaVersions] ADD PRIMARY KEY ([Feature], [CompatibleSchemaVersion])
GO

-- ----------------------------
-- Indexes structure for table aspnet_Users
-- ----------------------------
CREATE UNIQUE CLUSTERED INDEX [aspnet_Users_Index] ON [dbo].[aspnet_Users]
([ApplicationId] ASC, [LoweredUserName] ASC) 
GO
CREATE INDEX [aspnet_Users_Index2] ON [dbo].[aspnet_Users]
([ApplicationId] ASC, [LastActivityDate] ASC) 
GO

-- ----------------------------
-- Primary Key structure for table [dbo].[aspnet_Users]
-- ----------------------------
ALTER TABLE [dbo].[aspnet_Users] ADD PRIMARY KEY NONCLUSTERED ([UserId])
GO

-- ----------------------------
-- Indexes structure for table aspnet_UsersInRoles
-- ----------------------------
CREATE INDEX [aspnet_UsersInRoles_index] ON [dbo].[aspnet_UsersInRoles]
([RoleId] ASC) 
GO

-- ----------------------------
-- Primary Key structure for table [dbo].[aspnet_UsersInRoles]
-- ----------------------------
ALTER TABLE [dbo].[aspnet_UsersInRoles] ADD PRIMARY KEY ([UserId], [RoleId])
GO

-- ----------------------------
-- Indexes structure for table aspnet_WebEvent_Events
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[aspnet_WebEvent_Events]
-- ----------------------------
ALTER TABLE [dbo].[aspnet_WebEvent_Events] ADD PRIMARY KEY ([EventId])
GO

-- ----------------------------
-- Indexes structure for table HRMDepartment
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[HRMDepartment]
-- ----------------------------
ALTER TABLE [dbo].[HRMDepartment] ADD PRIMARY KEY ([DepartmentID])
GO

-- ----------------------------
-- Indexes structure for table HRMDesignation
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[HRMDesignation]
-- ----------------------------
ALTER TABLE [dbo].[HRMDesignation] ADD PRIMARY KEY ([DesignationID])
GO

-- ----------------------------
-- Indexes structure for table HRMEmployee
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[HRMEmployee]
-- ----------------------------
ALTER TABLE [dbo].[HRMEmployee] ADD PRIMARY KEY ([EmployeeID])
GO

-- ----------------------------
-- Indexes structure for table HRMEmployeeLeave
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[HRMEmployeeLeave]
-- ----------------------------
ALTER TABLE [dbo].[HRMEmployeeLeave] ADD PRIMARY KEY ([EmployeeLeaveID])
GO

-- ----------------------------
-- Indexes structure for table HRMEmployeeMembership
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[HRMEmployeeMembership]
-- ----------------------------
ALTER TABLE [dbo].[HRMEmployeeMembership] ADD PRIMARY KEY ([MembershipID])
GO

-- ----------------------------
-- Indexes structure for table HRMEmployeeProfessional
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[HRMEmployeeProfessional]
-- ----------------------------
ALTER TABLE [dbo].[HRMEmployeeProfessional] ADD PRIMARY KEY ([ProfessionalID])
GO

-- ----------------------------
-- Indexes structure for table HRMEmployeePublication
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[HRMEmployeePublication]
-- ----------------------------
ALTER TABLE [dbo].[HRMEmployeePublication] ADD PRIMARY KEY ([PublicationID])
GO

-- ----------------------------
-- Indexes structure for table HRMEmployeeVisit
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[HRMEmployeeVisit]
-- ----------------------------
ALTER TABLE [dbo].[HRMEmployeeVisit] ADD PRIMARY KEY ([VisitID])
GO

-- ----------------------------
-- Indexes structure for table HRMGrade
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[HRMGrade]
-- ----------------------------
ALTER TABLE [dbo].[HRMGrade] ADD PRIMARY KEY ([GradeID])
GO

-- ----------------------------
-- Indexes structure for table HRMLeave
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[HRMLeave]
-- ----------------------------
ALTER TABLE [dbo].[HRMLeave] ADD PRIMARY KEY ([LeaveID])
GO

-- ----------------------------
-- Indexes structure for table HRMShift
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[HRMShift]
-- ----------------------------
ALTER TABLE [dbo].[HRMShift] ADD PRIMARY KEY ([ShiftID])
GO

-- ----------------------------
-- Indexes structure for table INVBagFair
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[INVBagFair]
-- ----------------------------
ALTER TABLE [dbo].[INVBagFair] ADD PRIMARY KEY ([FairID])
GO

-- ----------------------------
-- Indexes structure for table INVInventoryLedger
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[INVInventoryLedger]
-- ----------------------------
ALTER TABLE [dbo].[INVInventoryLedger] ADD PRIMARY KEY ([LedgerID])
GO

-- ----------------------------
-- Indexes structure for table INVItem
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[INVItem]
-- ----------------------------
ALTER TABLE [dbo].[INVItem] ADD PRIMARY KEY ([ItemID])
GO

-- ----------------------------
-- Indexes structure for table INVItemCategory
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[INVItemCategory]
-- ----------------------------
ALTER TABLE [dbo].[INVItemCategory] ADD PRIMARY KEY ([CategoryID])
GO

-- ----------------------------
-- Indexes structure for table INVItemDetail
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[INVItemDetail]
-- ----------------------------
ALTER TABLE [dbo].[INVItemDetail] ADD PRIMARY KEY ([ItemDetailID])
GO

-- ----------------------------
-- Indexes structure for table INVItemGroup
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[INVItemGroup]
-- ----------------------------
ALTER TABLE [dbo].[INVItemGroup] ADD PRIMARY KEY ([GroupID])
GO

-- ----------------------------
-- Indexes structure for table INVItemSize
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[INVItemSize]
-- ----------------------------
ALTER TABLE [dbo].[INVItemSize] ADD PRIMARY KEY ([SizeID])
GO

-- ----------------------------
-- Indexes structure for table INVItemType
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[INVItemType]
-- ----------------------------
ALTER TABLE [dbo].[INVItemType] ADD PRIMARY KEY ([TypeID])
GO

-- ----------------------------
-- Indexes structure for table INVOpening
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[INVOpening]
-- ----------------------------
ALTER TABLE [dbo].[INVOpening] ADD PRIMARY KEY ([OpeningID])
GO

-- ----------------------------
-- Indexes structure for table INVParty
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[INVParty]
-- ----------------------------
ALTER TABLE [dbo].[INVParty] ADD PRIMARY KEY ([PartyID])
GO

-- ----------------------------
-- Indexes structure for table INVPurchase
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[INVPurchase]
-- ----------------------------
ALTER TABLE [dbo].[INVPurchase] ADD PRIMARY KEY ([PurchaseID])
GO

-- ----------------------------
-- Indexes structure for table INVRelocate
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[INVRelocate]
-- ----------------------------
ALTER TABLE [dbo].[INVRelocate] ADD PRIMARY KEY ([RelocateID])
GO

-- ----------------------------
-- Indexes structure for table INVSales
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[INVSales]
-- ----------------------------
ALTER TABLE [dbo].[INVSales] ADD PRIMARY KEY ([SalesID])
GO

-- ----------------------------
-- Indexes structure for table INVStockLoading
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[INVStockLoading]
-- ----------------------------
ALTER TABLE [dbo].[INVStockLoading] ADD PRIMARY KEY ([LoadingID])
GO

-- ----------------------------
-- Indexes structure for table INVStockSerial
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[INVStockSerial]
-- ----------------------------
ALTER TABLE [dbo].[INVStockSerial] ADD PRIMARY KEY ([SerialID])
GO

-- ----------------------------
-- Uniques structure for table [dbo].[INVStockSerial]
-- ----------------------------
ALTER TABLE [dbo].[INVStockSerial] ADD UNIQUE ([Serial] ASC)
GO
ALTER TABLE [dbo].[INVStockSerial] ADD UNIQUE ([SerialNo] ASC)
GO

-- ----------------------------
-- Indexes structure for table INVSupplier
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[INVSupplier]
-- ----------------------------
ALTER TABLE [dbo].[INVSupplier] ADD PRIMARY KEY ([SupplierID])
GO

-- ----------------------------
-- Indexes structure for table SRVLoanCollection
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[SRVLoanCollection]
-- ----------------------------
ALTER TABLE [dbo].[SRVLoanCollection] ADD PRIMARY KEY ([LCollectionID])
GO

-- ----------------------------
-- Indexes structure for table SRVLoanDisburse
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[SRVLoanDisburse]
-- ----------------------------
ALTER TABLE [dbo].[SRVLoanDisburse] ADD PRIMARY KEY ([LoanID])
GO

-- ----------------------------
-- Indexes structure for table SRVRegistration
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[SRVRegistration]
-- ----------------------------
ALTER TABLE [dbo].[SRVRegistration] ADD PRIMARY KEY ([RegistrationID])
GO

-- ----------------------------
-- Uniques structure for table [dbo].[SRVRegistration]
-- ----------------------------
ALTER TABLE [dbo].[SRVRegistration] ADD UNIQUE ([SerialNo] ASC)
GO

-- ----------------------------
-- Indexes structure for table sysdiagrams
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[sysdiagrams]
-- ----------------------------
ALTER TABLE [dbo].[sysdiagrams] ADD PRIMARY KEY ([diagram_id])
GO

-- ----------------------------
-- Uniques structure for table [dbo].[sysdiagrams]
-- ----------------------------
ALTER TABLE [dbo].[sysdiagrams] ADD UNIQUE ([principal_id] ASC, [name] ASC)
GO

-- ----------------------------
-- Indexes structure for table SYSVariables
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[SYSVariables]
-- ----------------------------
ALTER TABLE [dbo].[SYSVariables] ADD PRIMARY KEY ([varID])
GO

-- ----------------------------
-- Uniques structure for table [dbo].[SYSVariables]
-- ----------------------------
ALTER TABLE [dbo].[SYSVariables] ADD UNIQUE ([VariableName] ASC)
GO

-- ----------------------------
-- Foreign Key structure for table [dbo].[aspnet_Membership]
-- ----------------------------
ALTER TABLE [dbo].[aspnet_Membership] ADD FOREIGN KEY ([ApplicationId]) REFERENCES [dbo].[aspnet_Applications] ([ApplicationId]) ON DELETE NO ACTION ON UPDATE NO ACTION
GO
ALTER TABLE [dbo].[aspnet_Membership] ADD FOREIGN KEY ([UserId]) REFERENCES [dbo].[aspnet_Users] ([UserId]) ON DELETE NO ACTION ON UPDATE NO ACTION
GO

-- ----------------------------
-- Foreign Key structure for table [dbo].[aspnet_Paths]
-- ----------------------------
ALTER TABLE [dbo].[aspnet_Paths] ADD FOREIGN KEY ([ApplicationId]) REFERENCES [dbo].[aspnet_Applications] ([ApplicationId]) ON DELETE NO ACTION ON UPDATE NO ACTION
GO

-- ----------------------------
-- Foreign Key structure for table [dbo].[aspnet_PersonalizationAllUsers]
-- ----------------------------
ALTER TABLE [dbo].[aspnet_PersonalizationAllUsers] ADD FOREIGN KEY ([PathId]) REFERENCES [dbo].[aspnet_Paths] ([PathId]) ON DELETE NO ACTION ON UPDATE NO ACTION
GO

-- ----------------------------
-- Foreign Key structure for table [dbo].[aspnet_PersonalizationPerUser]
-- ----------------------------
ALTER TABLE [dbo].[aspnet_PersonalizationPerUser] ADD FOREIGN KEY ([PathId]) REFERENCES [dbo].[aspnet_Paths] ([PathId]) ON DELETE NO ACTION ON UPDATE NO ACTION
GO
ALTER TABLE [dbo].[aspnet_PersonalizationPerUser] ADD FOREIGN KEY ([UserId]) REFERENCES [dbo].[aspnet_Users] ([UserId]) ON DELETE NO ACTION ON UPDATE NO ACTION
GO

-- ----------------------------
-- Foreign Key structure for table [dbo].[aspnet_Profile]
-- ----------------------------
ALTER TABLE [dbo].[aspnet_Profile] ADD FOREIGN KEY ([UserId]) REFERENCES [dbo].[aspnet_Users] ([UserId]) ON DELETE NO ACTION ON UPDATE NO ACTION
GO

-- ----------------------------
-- Foreign Key structure for table [dbo].[aspnet_Roles]
-- ----------------------------
ALTER TABLE [dbo].[aspnet_Roles] ADD FOREIGN KEY ([ApplicationId]) REFERENCES [dbo].[aspnet_Applications] ([ApplicationId]) ON DELETE NO ACTION ON UPDATE NO ACTION
GO

-- ----------------------------
-- Foreign Key structure for table [dbo].[aspnet_Users]
-- ----------------------------
ALTER TABLE [dbo].[aspnet_Users] ADD FOREIGN KEY ([ApplicationId]) REFERENCES [dbo].[aspnet_Applications] ([ApplicationId]) ON DELETE NO ACTION ON UPDATE NO ACTION
GO

-- ----------------------------
-- Foreign Key structure for table [dbo].[aspnet_UsersInRoles]
-- ----------------------------
ALTER TABLE [dbo].[aspnet_UsersInRoles] ADD FOREIGN KEY ([RoleId]) REFERENCES [dbo].[aspnet_Roles] ([RoleId]) ON DELETE NO ACTION ON UPDATE NO ACTION
GO
ALTER TABLE [dbo].[aspnet_UsersInRoles] ADD FOREIGN KEY ([UserId]) REFERENCES [dbo].[aspnet_Users] ([UserId]) ON DELETE NO ACTION ON UPDATE NO ACTION
GO

-- ----------------------------
-- Foreign Key structure for table [dbo].[INVItemInventory]
-- ----------------------------
ALTER TABLE [dbo].[INVItemInventory] ADD FOREIGN KEY ([ItemID]) REFERENCES [dbo].[INVItem] ([ItemID]) ON DELETE CASCADE ON UPDATE CASCADE NOT FOR REPLICATION
GO

-- ----------------------------
-- Foreign Key structure for table [dbo].[INVOpeningDetails]
-- ----------------------------
ALTER TABLE [dbo].[INVOpeningDetails] ADD FOREIGN KEY ([ItemID]) REFERENCES [dbo].[INVItem] ([ItemID]) ON DELETE CASCADE ON UPDATE CASCADE NOT FOR REPLICATION
GO
ALTER TABLE [dbo].[INVOpeningDetails] ADD FOREIGN KEY ([OpeningID]) REFERENCES [dbo].[INVOpening] ([OpeningID]) ON DELETE CASCADE ON UPDATE CASCADE NOT FOR REPLICATION
GO

-- ----------------------------
-- Foreign Key structure for table [dbo].[INVPurchase]
-- ----------------------------
ALTER TABLE [dbo].[INVPurchase] ADD FOREIGN KEY ([SupplierID]) REFERENCES [dbo].[INVSupplier] ([SupplierID]) ON DELETE CASCADE ON UPDATE CASCADE NOT FOR REPLICATION
GO

-- ----------------------------
-- Foreign Key structure for table [dbo].[INVPurchaseDetails]
-- ----------------------------
ALTER TABLE [dbo].[INVPurchaseDetails] ADD FOREIGN KEY ([ItemID]) REFERENCES [dbo].[INVItem] ([ItemID]) ON DELETE CASCADE ON UPDATE CASCADE NOT FOR REPLICATION
GO
ALTER TABLE [dbo].[INVPurchaseDetails] ADD FOREIGN KEY ([PurchaseID]) REFERENCES [dbo].[INVPurchase] ([PurchaseID]) ON DELETE NO ACTION ON UPDATE NO ACTION NOT FOR REPLICATION
GO

-- ----------------------------
-- Foreign Key structure for table [dbo].[INVSalesDetails]
-- ----------------------------
ALTER TABLE [dbo].[INVSalesDetails] ADD FOREIGN KEY ([ItemID]) REFERENCES [dbo].[INVItem] ([ItemID]) ON DELETE CASCADE ON UPDATE CASCADE NOT FOR REPLICATION
GO
ALTER TABLE [dbo].[INVSalesDetails] ADD FOREIGN KEY ([SalesID]) REFERENCES [dbo].[INVSales] ([SalesID]) ON DELETE CASCADE ON UPDATE CASCADE NOT FOR REPLICATION
GO
